Highlighted

Data Mapping to Handle Dynamic Cart URLS

Rookie Contributor

I am trying to map my cart URLs to create virtual page URLs in Google Analytics using a custom variable "page_name" which is uniquely defined as a trigger.  Basically I would like to overwrite the dynamic (and custom) url that our cart generates (eg. "/e%21gyKLyQRQ2VGmD8vfodJaNUTwr7CrNXJMDse4F1n0N") with a static URL (eg. "/cart-1.htm"), but ONLY within the cart (eg. "page_name" equals "upsell step 1").  I can map these globally within the GUA tag, but I cannot add conditions, and within the "Set Data Values" extension, I cannot access the Google variables.

Should be a pretty common thing, with single page multi step carts, etc... any ideas?

1 REPLY 1
Highlighted

Data Mapping to Handle Dynamic Cart URLS

Tealium Employee

Hi @jmartin,

just to make sure I understood your request, is the 'page' parameter you are trying to map to GUA, right?  This following command shows an example of this parameter being set up in a GUA tracking call.

 ga('send', { 'hitType': 'pageview', 'page': '/contact-us/submitted/', 'title': 'Contact Us Submitted' });

If this is what you are seeking, it is possible to map this value dynamically to our GUA tag. It is under Standard tab and it is called "Page". Please see our screenshot:

page.png

In this case you can use the set data value extension to populate the virtual page variable in specific conditions and map it to the tag.

Let me know in case it does not answer your question or if you need additional help.

Thanks,

Luciana