Below is the code that needs to be added when the user
Signs up Logs in
The {{variable}} templates need to be filled in with the actual values.
Below is the code that needs to be added when the user
Signs up Logs in
The {{variable}} templates need to be filled in with the actual values.
Below is the code that needs to be added when the user
Below is the code that needs to be added when the user
The {{variable}} templates need to be filled in with the actual values.
| <!-- 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-M9FZKB5');</script> | |
| <!-- End Google Tag Manager --> | |
| <script> | |
| window.dataLayer = window.dataLayer || []; | 
| // just need to add products to the current setup | |
| { | |
| event: "checkoutContactStep | checkoutPaymentStep | checkoutReviewStep", | |
| ecommerce: { | |
| checkout: { | |
| actionField: { | |
| step: "{{checkout.step}}", // 1 // The checkout step (starting at 1). | |
| }, | |
| products: [ | |
| { | 
| /* | |
| * action: purchase | |
| * description: fire when the user actually completes the expressway purchase | |
| */ | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| event: "eec.purchase", | |
| customerId: "{{customerId}}", // the customer id if available at purchase | |
| eecEventName: "Purchase", | |
| ecommerce: { | 
| POST https://slideruletech-test.myshopify.com/admin/api/2020-10/graphql.json | |
| Content-Type: application/json | |
| X-Shopify-Access-Token: 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 | |
| X-REQUEST-TYPE: GraphQL | |
| query { | |
| orders(first: 10) { | |
| edges { | |
| node { | |
| id | 
| /* | |
| * action: purchase | |
| * description: fire when the user actually completes the purchase | |
| * required fields: actionField.id, actionField.revenue , product.id, product.name, product.quantity, product.price, product.variant (if applicable) | |
| * reference: https://www.simoahava.com/analytics/enhanced-ecommerce-guide-for-google-tag-manager/#purchase | |
| * exmplae url: https://www.corpnet.com/ssl/payment/payment/llc-tx/6fd0e0e40/ | |
| */ | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| event: "purchase", | 
Below is the code that needs to be added when the user
Submits an email Logins in Signs up The {{variable}} templates need to be filled in with the actual values.
We will also have to add the gtm-container to the https://app-api.mylifejars.com/external/signup app and https://app.mylifejars.com/create-account
| /* | |
| * 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 |