Parameters
- url: string | URL
- events: {
events: {
channel: "mobile" | "server" | "web";
componentId: string;
componentType: "Entry" | "Variable";
context: {
app?: { name: string; version: string };
campaign: {
content?: string;
medium?: string;
name?: string;
source?: string;
term?: string;
};
gdpr: { isConsentGiven: boolean };
library: { name: string; version: string };
locale: string;
location?: {
city?: string;
continent?: string;
coordinates?: { latitude: number; longitude: number };
country?: string;
countryCode?: string;
postalCode?: string;
region?: string;
regionCode?: string;
timezone?: string;
};
page?: {
path: string;
query: Record<string, string>;
referrer: string;
search: string;
title?: string;
url: string;
[key: string]: JSONType;
};
screen?: { name: string; [key: string]: JSONType };
userAgent?: string;
};
experienceId?: string;
messageId: string;
originalTimestamp: string;
sentAt: string;
timestamp: string;
type: "component";
userId?: string;
variantIndex: number;
}[];
profile: { id: string; [key: string]: JSONType };
}[]events: {
channel: "mobile" | "server" | "web";
componentId: string;
componentType: "Entry" | "Variable";
context: {
app?: { name: string; version: string };
campaign: {
content?: string;
medium?: string;
name?: string;
source?: string;
term?: string;
};
gdpr: { isConsentGiven: boolean };
library: { name: string; version: string };
locale: string;
location?: {
city?: string;
continent?: string;
coordinates?: { latitude: number; longitude: number };
country?: string;
countryCode?: string;
postalCode?: string;
region?: string;
regionCode?: string;
timezone?: string;
};
page?: {
path: string;
query: Record<string, string>;
referrer: string;
search: string;
title?: string;
url: string;
[key: string]: JSONType;
};
screen?: { name: string; [key: string]: JSONType };
userAgent?: string;
};
experienceId?: string;
messageId: string;
originalTimestamp: string;
sentAt: string;
timestamp: string;
type: "component";
userId?: string;
variantIndex: number;
}[]
profile: { id: string; [key: string]: JSONType }
Returns boolean
true if the user agent successfully queued the data for transfer,
otherwise false.
Send a batch of analytics events using
navigator.sendBeacon.