07-11-2018 10:58 AM - edited 07-11-2018 11:02 AM
_tcaq.push(['captureIdentity', '<value>', '<identity-type>']);
how do insert this custom event into a tag
<value> -this is a utag data
<identity-type> -text
i tried doing this through javascript extension but getting an errorSolved! Go to Solution.
07-13-2018 07:26 AM - last edited on 07-13-2018 02:33 PM by kathleen_jo
What error are you getting, @XCCX?
What scope does the JS extension have?
For the rest of the answer I'm goign to assume you're getting a _tcaq is not defined error, and you have scoped your extension to the tag that creates and uses the _tcaq object...
Extensions run before tags, so if your _tcaq object is created by code in a tag then it won't be declared when the extension runs.
It's usually best to declare the variable first, something like:
var _tcaq = _tcaq || [];
that will use the existing object if it exists, and create a new array object if not.
Or you could scope the JS extension to "after tags" which should mean the object has been created by the time the code runs.
07-19-2018 07:17 AM