Event ID: Enter the machine name for the Event Name such as add_to_cart.
Customer Site: Click Global.
Event Type: Click Other.
Click Save to save the event.
(Optional) Create metadata about the event being captured in Personalization
To map more metadata about the event, you must add column metadata for the event to Personalization. The following example captures the name of the product added as part of the Add to Cart event.
Accessor: custom_field_1(getCustomField1) (ensure you note the number for the field)
Type: String
Description: ProductnamefromAddtoCart
Create the tag in Google Tag Manager
Sign in to Google Tag Manager.
Create a new tag titled Personalization - Event - Add to Cart.
In the tag configuration select the Personalization Capture custom template as your tag type.
In the Capture Type menu, select Event.
Enter add_to_cart as the Event ID. Ensure the Event ID matches the Event ID value generated in Personalization.
To capture the product name in Personalization, map the product name dataLayer variable to the column metadata field (event_udf1) created earlier. In the Event Custom Parameters section, enter the values:
Parameter name: event_udf1
Parameter value: {{product-name}}
After configuring the tag, you can create a new trigger or select an existing trigger. The following example, creates a new trigger from a form fill.
For more information on creating a new trigger in Google Tag Manager, see About triggers
Once the fields are mapped and have a trigger set, click Save to save the tag.
The tag will now capture any AddtoCart event on the page the name of the product added to the cart.
Capture page events with Google Tag Manager
After adding the Personalization Capture template to your Google Tag Manager workspace you can capture various page events in Personalization.
Event ID: Enter the machine name for the Event Name such as add_to_cart.
Customer Site: Click Global.
Event Type: Click Other.
Click Save to save the event.
(Optional) Create metadata about the event being captured in Personalization
To map more metadata about the event, you must add column metadata for the event to Personalization. The following example captures the name of the product added as part of the Add to Cart event.
Accessor: custom_field_1(getCustomField1) (ensure you note the number for the field)
Type: String
Description: ProductnamefromAddtoCart
Create the tag in Google Tag Manager
Sign in to Google Tag Manager.
Create a new tag titled Personalization - Event - Add to Cart.
In the tag configuration select the Personalization Capture custom template as your tag type.
In the Capture Type menu, select Event.
Enter add_to_cart as the Event ID. Ensure the Event ID matches the Event ID value generated in Personalization.
To capture the product name in Personalization, map the product name dataLayer variable to the column metadata field (event_udf1) created earlier. In the Event Custom Parameters section, enter the values:
Parameter name: event_udf1
Parameter value: {{product-name}}
After configuring the tag, you can create a new trigger or select an existing trigger. The following example, creates a new trigger from a form fill.
For more information on creating a new trigger in Google Tag Manager, see About triggers
Once the fields are mapped and have a trigger set, click Save to save the tag.
The tag will now capture any AddtoCart event on the page the name of the product added to the cart.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.