Go to Settings > Checkout > Attional Scripts > Order status page.
Fill in YOUR CONTAINER ID
| { | |
| "exportFormatVersion": 2, | |
| "exportTime": "2024-01-04 16:27:54", | |
| "containerVersion": { | |
| "path": "accounts/6004616452/containers/116024490/versions/0", | |
| "accountId": "6004616452", | |
| "containerId": "116024490", | |
| "containerVersionId": "0", | |
| "container": { | |
| "path": "accounts/6004616452/containers/116024490", |
| { | |
| "exportFormatVersion": 2, | |
| "exportTime": "2023-08-31 21:22:41", | |
| "containerVersion": { | |
| "path": "accounts/4701996609/containers/164567808/versions/0", | |
| "accountId": "4701996609", | |
| "containerId": "164567808", | |
| "containerVersionId": "0", | |
| "container": { | |
| "path": "accounts/4701996609/containers/164567808", |
| // On login | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| 'event': 'login', // constant | |
| 'partnerName': 'Intuit', | |
| 'partnerId': 123, | |
| 'user_id: '24073' | |
| }); | |
| // On signup |
| <!-- Google Tag Manager --> | |
| <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
| new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
| j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
| 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
| })(window,document,'script','dataLayer','GTM-PF7D9F9');</script> | |
| <!-- End Google Tag Manager --> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ |
| {% if first_time_accessed %} | |
| <script> | |
| // Require the necessary APIs | |
| var logToConsole = console.log; | |
| var log = logToConsole; | |
| var localStorage = window.localStorage; | |
| getCookie = function (name) { | |
| var match = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)")); | |
| if (match) return match[2]; |
| /* | |
| * based on https://www.labnol.org/code/json-web-token-201128 | |
| * Use https://jwt.io/#debugger-io to verify | |
| */ | |
| function createJwt(privateKey, expiresInHours, data) { | |
| // Sign token using HMAC with SHA-256 algorithm | |
| const header = { | |
| alg: "HS256", | |
| typ: "JWT", |
| import { eventObserver } from 'ui-event-observer' | |
| const clickHandler = (event) => { | |
| const { | |
| target: { href, innerText, dataset }, | |
| } = event | |
| if (dataset && dataset.action) { | |
| const { object, action } = dataset | |
| const eventName = `${object} ${action}` | |
| track(eventName, { |
Go to Settings > Checkout > Attional Scripts > Order status page.
Fill in YOUR CONTAINER ID
| /* | |
| * description: You need to update the products array to change the id field | |
| * from the product id to the product sku so it matches the checkout experience. | |
| * See the example product detail event below. | |
| */ | |
| { | |
| event: "view_item_ua", | |
| ecommerce: { | |
| detail: { |
| /* | |
| * action: signup | |
| * description: fire whenever a new user signs up for the first time (ie creates an account) | |
| * notes: fill in the necessary information in brackets {{}} | |
| */ | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| event: "User Signed Up", | |
| userId: "{{userId}}", // The user id | |
| emailAddress: "{{emailAddress}}", // The user's email address |