Tracking URL Clicks in a survey | XM Community
Skip to main content

 I am looking to use tags to track URL clicks  and am not having much success with the code (it’s not generating metadata). I created a text/graphic field with the url and added Javascript 

 

<div><a href="https://jobs.baesystems.com/global/en/alumni " id="Link1" rel="noopener" target="_blank">Alumni Site</a> - Resources for BAE Sys Alumni</div>

jQuery('#Link1').click(function(event) { Qualtrics.SurveyEngine.setEmbeddedData("clicked1", "1")

 

I have been struggling where to put the code in Qualtrics to create the fields and then call them. Does anyone have guidance on where I should put these?

We need to put the code here in addOnReady function.


@Shashi , thank you. This was exactly what I was looking for. 


I just described in some other topic in detail what to do to track if a link was clicked in case you are working with simple layout. Just wanted to link this here as well as the setup above is probably in regards to other layouts. 


Leave a Reply