Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Detailed information here:
- https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce
- // Include in all pages
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-6378212-24"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', 'UA-6378212-24', {
- 'linker': {
- 'domains': ['gsx.org', 'asisonline.org', 'wyndhamjade.com', 'mcisemi.com']
- }
- });
- </script>
- // Include as needed by transaction step.
- // Add to Cart ///////////////////////////
- gtag('event', 'add_to_cart', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ]
- });
- // Begin Checkout ///////////////////////////
- gtag('event', 'begin_checkout', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ],
- "coupon": ""
- });
- // Purchase Steps //////////////////////////////////
- 1. Registration /asis2019/registration.html
- gtag('event', 'checkout_progress', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ],
- "checkout_step": 1,
- "checkout_option": "Registration"
- });
- 2. Profile /asis2019/profile.html
- gtag('event', 'checkout_progress', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ],
- "checkout_step": 2,
- "checkout_option": "Profile"
- });
- 3. Survey /asis2019/survey.html
- gtag('event', 'checkout_progress', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ],
- "checkout_step": 3,
- "checkout_option": "Survey"
- });
- 4. Payment /asis2019/payment.html
- gtag('event', 'checkout_progress', {
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- }
- ],
- "checkout_step": 4,
- "checkout_option": "Payment"
- });
- // Transaction //////////////////////////////////
- gtag('event', 'purchase', {
- "transaction_id": "24.031608523954162",
- "affiliation": "GSX Registration",
- "coupon": "VENDORCOUPON",
- "value": 23.07,
- "currency": "USD",
- "tax": 1.24,
- "shipping": 0,
- "items": [
- {
- "id": "P12345",
- "name": "Expo-Only Pass: Nonmember",
- "quantity": 2,
- "price": '2.0'
- },
- {
- "id": "P67890",
- "name": " All-Access Pass: Nonmember",
- "quantity": 1,
- "price": '3.0'
- }
- ]
- });
Add Comment
Please, Sign In to add comment