This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"event_time": 1685477025, | |
"event_name": "Purchase", | |
"event_id": "5463558619226", | |
"action_source": "website", | |
"event_source_url": "https://x.com/5822885/orders/03cb26fe531ac7e74a9eb7940e4d6ed0/authenticate?key=23217a311fb7229a2b228864ff5a0a56", | |
"user_data": { | |
"fbc": "fb.1.1685476791236.IwAR0zvwQTiE8VcM80guIEvTVrRMl089lofH7uQC57yqGGYdVCwYBU1RSUKGQ_aem_th_AcWhwy8Ztd-lVoj2_CVrXVFD4CVca7RwNpKwIG4Ax4Mb-DPOJuUtSHbf49Z9OF_cIsghfxmb9ftEHwh7PAZ1mjnm", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var _learnq = _learnq || []; | |
var item = { | |
"ProductName": "{{dlv - Product View - Name}}", | |
"ProductID": "{{dlv - Product View - Product ID}}", | |
"ImageURL": "https:{{dlv - Product View - Image}}", | |
"URL": "https://{{Page Hostname}}{{Page Path}}", | |
"Brand": "{{dlv - Product View - Brand}}", | |
"Price": {{dlv - Product View - Price}}, | |
"CompareAtPrice": {{dlv - Product View - Compare At Price}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LineItemKey = | |
| `ItemCategory${number}` | |
| `ItemSku${number}` | |
| `ItemSubTotal${number}` | |
| `ItemQuantity${number}` | |
| `ItemName${number}`; | |
export type ImpactRadiusLineItems = { | |
[key in LineItemKey]: number | string; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include the required APIs | |
const log = require('logToConsole'); | |
const sendPixel = require('sendPixel'); | |
const encodeUriComponent = require('encodeUriComponent'); | |
const copyFromDataLayer = require('copyFromDataLayer'); | |
const localStorage = require('localStorage'); | |
const queryPermission = require('queryPermission'); | |
const getCookieValues = require('getCookieValues'); | |
const localStorageID = 'partnerizeClickReference'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invalid request: {'data': [{'event_time': 1685858347, 'event_name': 'view_category', 'event_id': '2e6a02c8-24b9-4a8f-a0e3-301295efd503', 'action_source': 'web', 'event_source_url': 'https://www.hunterfan.com/collections/ceiling-fans?filter.p.m.ProductTag.Multi_Exclusive_Technology=SureSpeed+Guarantee&filter.p.m.ProductTag.Fan_Size=52+inch&filter.p.m.ProductTag.Housing_color_Multi=White&filter.p.m.ProductTag.Type=Indoor&sort_by=manual', 'user_data': {'external_id': ['c3b451ea196d0ad5556e3f9c7dee5929ffe458769eb30bb33d52856f9e9464d8'], 'country': ['79adb2a2fce5c6ba215fe5f27f532d4e7edbac4b6a5e09e1ef3a08084a904621'], 'ct': ['8ee68da841902b2c811b8c7dbe72efcce7ee287feeab966f680a2428a34d57bd'], 'st': ['193d984cc43c234ce581f221496f1965ff3be1a7f416f8ea6ed83e7b96a132a2'], 'zp': ['9c71a8438524c134eac7c88fb0337a0544d89280fb54219eab6b6919352a5d61'], 'client_ip_address': '104.6.103.130', 'client_user_agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Mobile/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How we listen for events | |
window.addEventListener("emailSubmittedEvent", event => { | |
if (event.detail.lead_type === "email") { | |
push({ email: event.detail.email }); | |
} | |
if (event.detail.lead_type === "phone") { | |
push({ phone: event.detail.phone }); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { type KlaviyoEventsConnectorConfig } from "elevar-common-ts/src/apiTypes"; | |
import { type ChannelContext } from "../subscriber/context/types"; | |
import { type ConfigToStandardEvent } from "./message"; | |
/* ========================================================================== */ | |
// https://developers.klaviyo.com/en/reference/create_event | |
export type KlaviyoEventPayload = { | |
data: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"token": "1bee3c84eef8e43800c5d4ac2adaec94", | |
"note": null, | |
"attributes": { | |
"_elevar__fbp": "fb.1.1689171902384.1162845275", | |
"_elevar__ga": "GA1.1.6d9d59fe-cb67-43a1-95ce-b1756390d71b", | |
"_elevar__ga_9P8MDN9F41": "GS1.1.1689171901.1", | |
"_elevar__ga_W908C3LLGQ": "GS1.1.1689171901.1", | |
"_elevar_visitor_info": "{\"user_id\":\"6d9d59fe-cb67-43a1-95ce-b1756390d71b\",\"session_id\":\"1689171901\",\"session_count\":\"21\",\"referrer\":\"https://www.google.com/\",\"OutbrainClickID\":\"test\"}" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hash = async (str) => { | |
return [ | |
...new Uint8Array( | |
await crypto.subtle.digest( | |
"SHA-256", | |
new TextEncoder().encode(str) | |
) | |
) | |
].map(b => b.toString(16).padStart(2, "0")).join("") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Event: Page View | |
// URL | |
// Zulily.com/track/pageview | |
// Payload | |
{ | |
"name": "PAGEVIEW", | |
"pagetype": "home", | |
etc... |