AIQ Ecommerce Integrations
Analytics
X via Google Tag Manager (fka Twitter)
7min
custom events 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 'view item', 'add to cart', 'remove from cart', 'begin checkout', 'purchase' setup custom events navigate to triggers > new > custom event the event name must match the exact format you see in the above code block custom events custom variable 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 ecommerce { currency "currency", transaction id "orderid", value total, tax; tax, items \[ { item name "productname", affiliation "venue name", index 0, item brand "productbrand", item category "producttype", item category2 "productsubtype", location id "venue id", price productprice, quantity quantity } ] } setup custom variable 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 variable configuration add twitter base pixel tag add new tag > twitter base pixel > pixel id add new trigger > all pages (page view) twitter base pixel tag add twitter event pixel tag 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 add twitter event pixel tag verifying changes 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