- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-11-2020 09:28 PM
I am trying to replace a specific string using the Set Data values extension. I think the code I am using is correct but it doesn't seem to be working.
The JS code that I am using to replace the string is as follow:
Any ideas why the above isn't working?
10-12-2020 09:44 PM
Is page_name "undefined" or undefined?
If it is a String then your code will work, however if page_name is simply undefined then you are probably looking for:
10-14-2020 04:08 PM - edited 10-14-2020 04:09 PM
Hi Matt (@malexander),
Thanks for your response!
The page name shows the string "undefined" e.g "undefined:abc:products:shoes". This is shown in our analytics reporting platform.
10-14-2020 08:41 PM
Hi Max (@max_wong),
In that case I see no issue with your approach, and have tested that it works based on your supplied code. My suggestion would be to raise a support ticket with firstname.lastname@example.org and share with them a live example (e.g. URL), so they can identify why the value for page_name is not being updated.
10-15-2020 08:52 AM
@max_wong Can you post a screenshot of the extension?
10-18-2020 04:57 PM
@david_bird - Sure. Please find the below for your viewing:
10-20-2020 12:59 AM
Hi @max_wong ,
Were you able to debug the condition you have given for the set data values ?
Try putting debugger in that particular set datavalues in the utag.js file in your website and check whether your condition is getting passed ?
Copyright All Rights Reserved © 2008-2023