Is it possible to capture custom value dynamically for an url that we provide? Basically, we are looking to use tracking id and a custom value to identify an user behaviour. For example, is it possible to do something like this in AA? www.test.ca?cid=122&colour=red colour=red needs to be dynamically populated. Is that something that can be done?
First off, is both 'colour' and 'red' dynamic? Or just 'red'?
If just 'red' is dynamic, this is a lot easier... you can just create a data element using "Query String Parameter" and specifying "colour" as the item:
However, if 'colour' could also be dynamic, you will need to write custom code to extra and process this from your string... and you will need to determine rules on how you want to collect it.. what if there are more than one parameter provided (?cid=123&colour=red&shape=square), do you want them all concatenated into a comma separate list?
The following JS will get ALL querystrings:
var allparams = window.location.search;
allparams will get '?cid=234&colour=red&shape=square'
Then you can use JS to process this data how you need it to be processed, and pass that to the prop or evar of your choice.. or into your s.campaigns
Maybe you only want cid in s.campaigns, and colour and shape to be somewhere else.. you can use JS to parse out the cid and value, leaving you with extra params to use as you wish.