Replicate Google Analytics acquisition information (source, medium, GCLID, etc) as variables in Google Tag Manager.
Based on this Bounteous container.
Updated to include GCLID
See here for instructions.
| { | |
| "exportFormatVersion": 2, | |
| "exportTime": "2020-09-17 15:47:20", | |
| "containerVersion": { | |
| "path": "accounts/4701996609/containers/32482051/versions/0", | |
| "accountId": "4701996609", | |
| "containerId": "32482051", | |
| "containerVersionId": "0", | |
| "container": { | |
| "path": "accounts/4701996609/containers/32482051", |
Replicate Google Analytics acquisition information (source, medium, GCLID, etc) as variables in Google Tag Manager.
Based on this Bounteous container.
Updated to include GCLID
See here for instructions.
| // An example of what needs to be pushed to the datalayer when the user buys flikshop credits on the web app | |
| // We want to treat the 1, 10, 20 credit options as individual products. | |
| // The example below show what to push to the datalayer for the "10 Flikshop for $8.90" option. | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| event: 'purchase', | |
| ecommerce: { | |
| currency: 'USD', | |
| value: 8.90, // Total revenue for the tansaction | |
| tax: 0.00, // I think we don't have tax, correct? |
| /** | |
| * Call the built-in SDK function: | |
| * amount is Double (required) | |
| * currency is String from http://en.wikipedia.org/wiki/ISO_4217 (optional). | |
| * parameters is ParametersDictionary (optional). | |
| */ | |
| AppEvent.purchased( | |
| amount: purchaseAmount, | |
| currency: "USD", | |
| extraParameters: { |
| /** | |
| * logger is an instance of AppEventsLogger and has been | |
| * created using AppEventsLogger.newLogger() call. | |
| * purchaseAmount is BigDecimal, e.g. BigDecimal.valueOf(4.32). | |
| * currency is Currency, e.g. Currency.getInstance("USD"), | |
| * where the string is from http://en.wikipedia.org/wiki/ISO_4217. | |
| * parameters is Bundle. | |
| */ | |
| logger.logPurchase(purchaseAmount, 'USD', { | |
| contents: itemsArray, // Same array as firebase |
The code below needs to be added/updated to the current Datalayer Events. The goal of the update is to be able to determine when a product is added to the cart via an upsell and which items in the purchase come were added via the upsell.
here's a video description
These changes should be made the checkout process starting the https://winreality.com/cart/#payment page.
They will let us track the checkout and purchase events accurately in google analytics, other tracking pixels.
The update to purchase-form.html will attach source information directly to purchases and thus customers.
Here's a video description.
Below is the code that needs to be added when the user
The {{variable}} templates need to be filled in with the actual values.
| /* | |
| * action: dashboard | |
| * description: fire on every dashboard page | |
| * url: https://rebaid.com/dashbaord | |
| * notes: | |
| */ | |
| window.dataLayer = window.dataLayer || []; | |
| window.dataLayer.push({ | |
| event: "dashboard", | |
| eventName: "Dashboard", |
Below is the code that needs to be added when the user
The {{variable}} templates need to be filled in with the actual values.