- page view
- view item
- view item list
- select item
- add to cart
- remove from cart
- login
- sign up
- view cart
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
{ | |
"textPayload": "Domain: danas-3-13-new-install.myshopify.com Sending Event to Klaviyo (obfuscated)", | |
"data": { | |
"type": "event", | |
"attributes": { | |
"value": 629.95, | |
"unique_id": "8c70b10f-e859-4e51-81f4-707c9af99339", | |
"profile": { | |
"$email": "bc17df29a4c0d90d70abe7c07d081b3049e1c5a6b4638eba0c6c8e7a888c62b8", | |
"$first_name": "2c9e0a2585dc7406589a3724f0027811506e0f133726303a15d6779d532a2573", |
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 PostscriptEventPayload = { | |
type: string; // event name | |
phone?: string; | |
email?: string; | |
external_id: string; // event id | |
// Because Postscript doesn't allow nested properties (yet) we have been advised by Postscript to keep the payload simple. | |
properties: { | |
preEventCartTotal?: number; | |
preEventCartItemCount?: number; | |
currency?: 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
#!/usr/bin/env python | |
# Copyright 2018 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
// Lucky Labs creates a Custom Event with additional data | |
var luckyEvent = new CustomEvent('luckyEvent', | |
{ | |
detail: | |
{ | |
message: 'store_finder_event', | |
email: "[email protected]", | |
location: "", | |
otherInfo: "", | |
product: {} |
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
export type PostscriptEventPayload = { | |
type: string; // event name | |
phone?: string; | |
email?: string; | |
external_id: string; // event id | |
// Because Postscript doesn't allow nested properties (yet) we have been advised by Postscript to keep the payload simple. | |
properties: { | |
preEventCartTotal?: number; | |
preEventCartItemCount?: number; | |
currency?: 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
<script defer src="https://cdn.jsdelivr.net/gh/elephantsneverforget/gtm_block_detect@main/gtm_block_detect_d.js"></script> |
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
window.ElevarDataLayer.push({ | |
event: "dl_subscribe", | |
lead_type: "...", // should be "email" or "phone" | |
user_properties: { | |
customer_email: "...", // required if lead type is "email" | |
customer_phone: "..." // required if lead type is "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
getTotalShippingDiscount: function (event) { | |
const discountApplications = event?.data?.checkout?.discountApplications || []; | |
const shippingDiscountApplications = discountApplications.filter( | |
(discountApplication) => discountApplication?.targetType === "SHIPPING_LINE" | |
); | |
const shippingDiscountApplicationsPercentBased = | |
shippingDiscountApplications.filter( | |
(discountApplication) => | |
typeof discountApplication?.value?.percentage !== "undefined" |