Skip to content

Instantly share code, notes, and snippets.

View elephantsneverforget's full-sized avatar

Jonathan Cairo elephantsneverforget

View GitHub Profile
{
"error": {
"message": "(#100) Missing Permission",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "ArwbZb_gDgTYZIONKpgNfmx"
}
}
@elephantsneverforget
elephantsneverforget / meta_sample_payload.json
Created April 16, 2024 20:50
Meta new/returning events with "origin"
{
"data": [
{
"event_name": "Purchase_NewCustomer",
"event_time": 1713300268,
"action_source": "website",
"user_data": {
"em": [
"7b17fb0bd173f625b58636fb796407c22b3d16fc78302d79f0fd30c2fc2fc068"
],
export type MixpanelEventPayload = {
event?: string; // event name
properties: {
$source: "elevar";
ip?: string;
token: string; // project token input by user
time: number; // milliseconds since epoch
$insert_id: string | number; // event id,
distinct_id?: string; // user id
$browser?: string;
export type KlaviyoEventPayload = {
data: {
type: "event";
attributes: {
value?: number;
unique_id: string; // event_id
profile: {
// One of email or phone is required on every API call
$email: string;
$first_name?: string;
{
"message": "There were 1 invalid conversion events. None were processed.",
"invalid_events": [
{
"error_message": "there was a problem validating event_type: event_type with custom_event_name must be a Custom event: Purchase",
"event": {
"event_at": "2024-03-26T17:51:01-04:00",
"event_type": {
"tracking_type": "Purchase",
"custom_event_name": "string"
<script type="module">
try {
const settings = {};
const config = (await import("https://shopify-gtm-suite.getelevar.com/configs/41192d94c4af24912cec0b65eb5e29a0b3ba6634/config.js")).default;
const scriptUrl = settings.proxyPath
? `${settings.proxyPath}${config.script_src_custom_pages_proxied}`
: config.script_src_custom_pages;
if (scriptUrl) {
const { handler } = await import(scriptUrl);
// Replace CUSTOMERID with the specific customer id & add your api key
const apiUrl = 'https://example.com/admin/api/2024-01/customers/CUSTOMERID.json';
async function fetchOrdersCount() {
const response = await fetch(apiUrl, {
method: 'GET',
headers: { 'Content-Type': 'application/json',
// Add your api key
}
});
{
"order": {
"id": 5186149122131,
"admin_graphql_api_id": "gid://shopify/Order/5186149122131",
"app_id": 129785,
"browser_ip": "204.131.216.58",
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": null,
{
"cookies": {
"_fbp": "fb.1.1706753303054.641445551",
"_ga": "GA1.1.1859021952.1706753301",
"_gid": "GA1.2.398415646.1706753301",
"_scid": "5064e905-7380-467e-8a9c-4df8188f3443",
"_ga_0TD669KGPM": "GS1.1.1706795927.2",
"_ga_M554GRGBNJ": "GS1.1.1706795849.2",
"_ga_TQZTM6R9MN": "GS1.1.1706795933.2"
},
{
"cookies": {
"_uetsid": "76480e10c10711ee8868458eafecae8b",
"_uetvid": "76486330c10711eeb50abb8102b7de3e",
"_fbp": "fb.1.1706794829673.1457620308",
"_ga": "GA1.1.369098533.1706794830",
"_ga_BKZV7MVXM7": "GS1.1.1706794829.1"
},
"landingSite": {},
"visitorInfo": {