How to Add dynamic ExitUrl to taparea Touch/Click in Google Web Designer

28 Views Asked by At

I'm trying to follow Step 1 of the the following doc: https://support.google.com/richmedia/answer/2664807?hl=en#zippy=%2Ccombine-the-dynamic-exit-url-and-suffix-in-google-web-designer

The document asks to add the following code to a Touch/Click event:

`// Replace the dynamicContent value below with your own dynamic element value.

var exitURL = dynamicContent.Feed_1[0].ExitURL.Url;

var urlSuffix = Enabler.getParameter('exit_suffix'); 

var symbol = (exitURL.indexOf('?') > -1) ? '&': '?'; 

if (urlSuffix) { 

  while (urlSuffix.charAt(0) == '?' || urlSuffix.charAt(0) == '&') { 

    urlSuffix = urlSuffix.substring(1); 

  } 

  if (urlSuffix.indexOf('?') > -1) { 

    urlSuffix = urlSuffix.replace(/\?/g, '&'); 

  } 

} 

exitURL = exitURL + symbol + urlSuffix;

Enabler.exitOverride('exit', exitURL);`

Can anyone help me figure out what should be in the exitURL to get the Dynamic URL?

dynamicContent.FeedName[0] is not working for me and dynamicContent['FeedName'][0] gives the hardcoded value for the first product.

0

There are 0 best solutions below