For this integration, we identified and defined recognized events that are typically
registered by Google Analytics.
If you would like to augment the default recognized Google Analytics events with your own
custom Google Analytics attributes, you can do so by modifying the corresponding attribute mapper
object. For example, if you have a custom Google Analytics attribute prdes
, and
want to map it to the Acoustic Exchange attribute productDesc
in
ibmproductView event, then it would be mapped
as:google_ubx.googleToUBXProductViewEvent.attributesMapper.push
(
{
"googleName":"prdes","ubxName":"productDesc","type":"string"
}
);
Recognized events
ibmproductView
Google attribute |
Acoustic Exchange attribute |
Attribute Type |
Acoustic Exchange mapper field |
Mapper Object |
Description |
pr1id |
productID |
string |
ga('ec:setAction', 'detail'); |
google_ubx.googleToUBXProductViewEvent |
The mapper checks for enhanced commerce plug-in fields to find product
information. The Google name in the mapper is the protocol parameter for the field. |
pr1nm |
productName |
string |
pr1ca |
category |
string |
pr1va |
color |
string |
pr1pr |
basePrice |
number |
pr1qt |
quantity |
number |
dl |
productURL |
string |
cid |
interactionID |
string |
Google Analytics reference documentation
cartAdd
Google attribute |
Acoustic Exchange attribute |
Attribute Type |
Acoustic Exchange mapper field |
Mapper Object |
Description |
pr1id |
productID |
string |
ga('ec:setAction', 'add'); |
google_ubx.googleToUBXAddToCartEvent |
The mapper checks for the enhanced commerce plug-in fields to find product
information. The Google name in the mapper is the protocol parameter for the field. |
pr1nm |
productName |
string |
pr1ca |
category |
string |
pr1va |
color |
string |
pr1pr |
basePrice |
number |
pr1qt |
quantity |
number |
dl |
productURL |
string |
cid |
interactionID |
string |
cu |
currency |
string |
Google Analytics reference documentation
cartRemove
Google attribute |
Acoustic Exchange attribute |
Attribute Type |
Acoustic Exchange mapper field |
Mapper Object |
Description |
pr1id |
productID |
string |
ga('ec:setAction', 'remove'); |
google_ubx.googleToUBXRemoveFromCartEvent |
The mapper checks for Enhanced commerce plug-in fields to find product
information. The Google name in the mapper is the protocol parameter for the field. |
pr1nm |
productName |
string |
pr1ca |
category |
string |
pr1va |
color |
string |
pr1pr |
basePrice |
number |
pr1qt |
quantity |
number |
dl |
productURL |
string |
cid |
interactionID |
string |
Google Analytics reference documentation
ibmcartPurchase
Google attribute |
Acoustic Exchange attribute |
Attribute Type |
Acoustic Exchange mapper field |
Mapper Object |
Description |
ti |
orderID |
string |
N/A |
google_ubx.googleToUBXCartPurchaseEvent |
By default the ibmcartPurchaseItem event is sent automatically
for each product when the event is triggered. You can turn this behavior off by setting the
google_ubx.sendIndividualItemPurchaseEventWithCartPurchaseEvent
= false; in the GAToUBXEventMapper.js file . |
tr |
orderTotal |
number |
cid |
interactionId |
number |
cu |
currency |
number |
pr<index>id |
productID |
string |
pr<index>nm |
productName |
string |
pr<index>ca |
category |
string |
pr<index>va |
color |
string |
pr<index>qt |
quantity |
number |
ibmpageView
Google attribute |
Acoustic Exchange attribute |
Attribute Type |
Acoustic Exchange mapper field |
Mapper Object |
Description |
cid |
interactionId |
string |
N/A |
google_ubx.googleToUBXPageViewEvent |
N/A |
dt |
pageId |
string |
dl |
pageURL |
string |
Custom attributes
The Google Analytics Acoustic Exchange mapper file has predefined mappings from the Google
Object Attributes to Acoustic Exchange attributes. These are attributes usually present in
the Google Object for most Google events and their mapping to Acoustic Exchange event
attributes is automatic. Because Google allows for a variety of custom attributes defined by the
client for Google events, mappings from those attributes to Acoustic Exchange attributes are
possible by adding to the mapping objects in the Google Acoustic Exchange Wrapper file. For
instance, to add a product description to the Google Product View Event, this code must be run after
the mapper file is loaded.
google_ubx.googleToUBXProductViewEvent.attributesMapper.push
(
{
"googleName":"prdes","ubxName":"productDesc","type":"string"
}
);
Comments
0 comments
Article is closed for comments.