X via Google Tag Manager (fka Twitter)
First you will need to setup the custom events you will want to track. In this doc, we will show you how to setup the purchase event, but AIQ Ecommerce supports the following custom events.
Navigate to Triggers > New > Custom Event
The event name must match the exact format you see in the above code block.
First you will want to know the format of how we send our data layer. We follow Google's recommended format for the data layer. Everything is nestled in the ecommerce object.
Next you will need to setup variables. This will ensure that the correct data from our data layer is sent to Twitter. Once again, we will continue to provide examples of the purchase event. We want the value property in the ecommerce object to be sent to Twitter, so the variable name will be ecommerce.value
Navigate to Variables > New User-Defined Variables > Data Layer Variable
Data Layer Variable Name = ecommerce.value
Data Layer Version = Version 2
Set Default Value = Enabled
Default Value = blank
Add new Tag > Twitter Event Pixel > Enter in Event ID
Value = Value Variable we set up a few steps ago (Mine is called Value Variable)
Currency = USD (This is not a variable, so you can define it as your location's currency (USD))
Trigger = Custom event you want this fired on
Once you publish your GTM container and enable it in your AIQ Ecommerce store, you should then be able to verify the data is flowing using Google Chrome's Twitter Pixel Helper Extension. These changes will take a few minutes.