For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Fullstory
FullStory는 디지털 경험 인텔리전스 플랫폼입니다. 앱은 전환 퍼널, 고급 검색 기능, 사용자 세션 재생 및 개발자 도구를 사용할 수 있습니다.
연동 설정
Amplitude 플러그인 설정
Amplitude 목적지 플러그인 변형은 이벤트를 FullStory로 전달합니다. 다음 템플릿은 FullStory에 맞게 조정된 목적지 플러그인을 정의합니다. FullStory 브라우저 SDK의 인스턴스를 생성하고 Amplitude SDK에서 추적된 이벤트를 전달합니다. 이 템플릿을 사용자의 필요에 맞게 사용자 정의하십시오.
ts
import { DestinationPlugin, Event, PluginType, Result } from '@amplitude/analytics-types';
export class FullstoryPlugin implements DestinationPlugin {
name = 'fullstory';
type = PluginType.DESTINATION as const;
fsOrg: string;
FS: Object
constructor(fsOrg: string) {
this.fsOrg = fsOrg;
this.FS = window.FS;
}
async setup(): Promise<void> {
window._fs_host||(window._fs_host="fullstory.com",window._fs_script="edge.fullstory.com/s/fs.js",window._fs_org=this.fsOrg,window._fs_namespace="FS",function(n,t,e,o,s,c,i,f){e in n?n.console&&n.console.log&&n.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'):((i=n[e]=function(n,t,e){i.q?i.q.push([n,t,e]):i._api(n,t,e)}).q=[],(c=t.createElement(o)).async=1,c.crossOrigin="anonymous",c.src="https://"+_fs_script,(f=t.getElementsByTagName(o)[0]).parentNode.insertBefore(c,f),i.identify=function(n,t,e){i(s,{uid:n},e),t&&i(s,t,e)},i.setUserVars=function(n,t){i(s,n,t)},i.event=function(n,t,e){i("event",{n:n,p:t},e)},i.anonymize=function(){i.identify(!1)},i.shutdown=function(){i("rec",!1)},i.restart=function(){i("rec",!0)},i.log=function(n,t){i("log",[n,t])},i.consent=function(n){i("consent",!arguments.length||n)},i.identifyAccount=function(n,t){c="account",(t=t||{}).acctId=n,i(c,t)},i.clearUserCookie=function(){},i.setVars=function(n,t){i("setVars",[n,t])},i._w={},f="XMLHTTPRequest",i._w[f]=n[f],f="fetch",i._w[f]=n[f],n[f]&&(n[f]=function(){return i._w[f].apply(this,arguments)}),i._v="1.3.0")}(window,document,window._fs_namespace,"script","user"));
this.FS = window.FS;
}
async execute(event: Event): Promise<Result> {
if (event.event_type === '$identify') {
this.FS.identify(event.user_id)
} else {
this.FS.event(event.event_type, event.event_properties)
}
return {
code: 200,
event: event,
message: 'Event forwarded to FullStory',
};
}
}
Amplitude 플러그인 사용
앱 코드에서 플러그인을 가져와서 Amplitude SDK 인스턴스에 추가하십시오.
ts
import * as amplitude from '@amplitude/analytics-browser';
import { FullstoryPlugin } from './FullstoryPlugin';
amplitude.init(AMPLITUDE_API_KEY);
amplitude.add(new FullstoryPlugin(FULLSTORY_KEY));
amplitude.logEvent('open app');
이 내용이 도움이 되었나요?