Targeting a Page URL with special characters that gets automatically encoded in the browser address bar
Due to the nature of special characters getting auto-encoded when used in the URL bar, it is recommended to use a Custom Evaluator to target page addresses that contain them.
In order to achieve this, you will need to do the following:
- In your DY section, under the "Assets" tab, go to "Evaluators", and click on "Create Evaluator".
- Give it a name that you select while using it in targeting (for example, "Special Char URL") and click on "Next".
- Replace the auto-generated placeholder code with the following:
(function(){
var url = location.href;
var decodedUrl = decodeURI(url);
return decodedUrl;
})() - Click on the "Save" CTA button to save the Evaluator.
- Now, under the "Site Personalization" tab, you can create any type of campaign, and in its targeting conditions, you could use this Evaluator, based on the name you gave it, under the "Where" conditions area.
* it is likely that you would want to use this Evaluator with the "contains" operator.
Please sign in to leave a comment.
Comments
0 comments