searchdiscovery / brookings-datalayer-specs

An Apollo generated Event Driven Data Layer
0 stars 1 forks source link

Register Event #16

Open jerry-bennett opened 1 year ago

jerry-bennett commented 1 year ago

Register Event

Javascript Code

window.dataLayer = window.dataLayer || [];
dataLayer.push({ event_data: null });  // Clear the previous event_data object.
dataLayer.push({
  "event": "register_event",
  "detailed_event": "Register Event",
    "event_data": {
        "event_count": "<event_count>",
        "event_name": "<event_name>",
        "identifier": "<identifier>"
    }
});

Variable Definitions

Path Type Description Example Pattern Min Length Max Length Minimum Maximum Multiple Of
event_data.event_name string Name of event user is trying to register to attend Asylum in Europe: Can the Ukraine response shape a better policy approach?
event_data.identifier string Captures the ID associated with exit links used. act now, cancel, ok, 3456, 8765
jerry-bennett commented 1 year ago

Tested on: https://preview.brookings.edu/events/assessing-insurance-regulation-and-supervision-of-climate-related-financial-risk

Use case: Clicked on "Attend in person"

Status: Working! Seeing the correct data layer push with no null values as well as the correct tag fire in GTM.

Image

Image

jerry-bennett commented 1 year ago

PROD QA:

Tested on: https://www.brookings.edu/events/the-childhood-cost-calculator-a-simple-tool-for-costing-interventions-for-children-and-youth/

Use case: Clicked on 'attend online'

Status: Looks great, seeing the data layer push and the tag fire.

Image

Image