Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout Started #15

Open
Nayuken opened this issue Sep 13, 2024 · 7 comments
Open

Checkout Started #15

Nayuken opened this issue Sep 13, 2024 · 7 comments
Assignees

Comments

@Nayuken
Copy link
Collaborator

Nayuken commented Sep 13, 2024

Checkout Started

This is the full dataLayer event for checkout started - the values for the ecommerce items will be the same as those passed with the add to cart event on the page.

Javascript Code

window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
dataLayer.push({
  "event": "begin_checkout",
    "ecommerce": {
        "currency": "<currency>",
        "coupon": "<coupon>",
        "items": [
            {
                "item_name": "<item_name>",
                "item_id": "<item_id>",
                "item_brand": "<item_brand>",
                "item_category": "<item_category>",
                "price": <price>,
                "quantity": <quantity>,
                "course_name": "<course_name>",
                "program_dates": "<program_dates>",

            }
        ],
        "value": <value>
    }
});

Variable Definitions

Path Type Description Example Pattern Min Length Max Length Minimum Maximum Multiple Of
ecommerce.currency string The currency, in 3-letter ISO 4217 format.
ecommerce.items[n].course_name string Value for Course Name. ex 'Financial Analysis and Valuation for Lawyers' Financial Analysis and Valuation for Lawyers, Data Privacy and Technology
ecommerce.items[n].course_price string Value for Course Price. ex. '1600' 1600, 945, 125.00
ecommerce.items[n].item_brand string Item brand Harvard Online
ecommerce.items[n].item_category string Item Category (context-specific) Include course categories similar to grouping on Harvard Online, if available
ecommerce.items[n].item_id string Item ID (context-specific).The product primary ID (SKU or UPC) Clotho_id for course
ecommerce.items[n].item_name string Item Name (context-specific). Same value as Course Name
ecommerce.items[n].price number The monetary price of the item, in units of the specified currency parameter. 9.99
ecommerce.items[n].program_dates string Value for Program Dates. ex. May 11, 2022 – May 10, 2023 May 11, 2022 – May 10, 2023
ecommerce.items[n].quantity integer Item quantity. 1
ecommerce.value number The monetary value of the event which will be equal to course price. 7.77, 239.55, 659

Image

Further's Event Validation

Event Parameter Result
pr1
cu
ep.coupon
epn.value
@Nayuken
Copy link
Collaborator Author

Nayuken commented Oct 31, 2024

Feedback:

@stephen-g-goss @rafaeltorresharvard this event is currently being blocked from functioning because of the CSP violation

@elizabethbrady-ep
Copy link
Collaborator

elizabethbrady-ep commented Nov 1, 2024

@Nayuken can you test this again? I think an issue is that the button doesn't trigger a click event in GTM and we might need to approach this another way (ie, add a full dataLayer push - which will be debatable if it's picked up in time with the offsite link event)

Image

@elizabethbrady-ep
Copy link
Collaborator

@rafaeltorresharvard @stephen-g-goss We had expected to the "proceed to checkout' button to be more similar to the Apply Now buttons on Harvard Online with an a tag built into it and the ability to pick up the link click with GTM . See now the html for the Apply Now button Image

Is there any way to modify the "proceed to checkout' button so we can pick up the link click? If not we will need to request a full dataLayer push event similar to the 'add to cart' event. And given the offsite link, we may run into into race conditions where we just won't pick up the data in GA4.

@elizabethbrady-ep
Copy link
Collaborator

Updated requirements for full ecommerce dataLayer event @rafaeltorresharvard @stephen-g-goss

@Nayuken
Copy link
Collaborator Author

Nayuken commented Nov 5, 2024

Feedback:

@rafaeltorresharvard This event is firing as expected when a user clicks the "proceed to checkout" button.

Further's Event Validation:

Event Parameter Result
pr1 item_name = Adaptive Leadership item_brand = Harvard Online item_id = test1234clotho price = 1600 item_quantity = 1 course_name = Adaptive Leadership program_date = February 24, 2025 - July 2, 2025
cu USD
ep.coupon 30%
epn.value 1120
ep.site_section CRP
ep.site_section2 CRP
ep.type CRP
ep.course_name Adaptive Leadership
ep.program_dates February 24, 2025 - July 2, 2025

QA datalayer:

{
  event: "begin_checkout",
  ecommerce: {
    currency: "USD",
    coupon: "30%",
    items: [
      {
        item_name: "Adaptive Leadership",
        item_id: "test1234clotho",
        item_brand: "Harvard Online",
        price: 1600,
        quantity: 1,
        course_name: "Adaptive Leadership",
        program_dates: "February 24, 2025 - July 2, 2025"
      }
    ],
    value: 1120
  },
  gtm.uniqueEventId: 280
}

@Nayuken
Copy link
Collaborator Author

Nayuken commented Nov 13, 2024

When transitioning to the payment site, I’m not seeing the "begin_checkout" event populating in the data layer for LXP. Are any updates currently being made to that site? @stephen-g-goss @rafaeltorresharvard

Image

@elizabethbrady-ep
Copy link
Collaborator

@Nayuken @rafaeltorresharvard FYI I now see this event passing for both courses on the SIT site Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants