Google Analytics Events in a Survey? | XM Community
Skip to main content

Hi, I'm currently evaluating Qualtrics and I've hit a roadblock - hopefully one of you experienced users has a clue?
On our current platform I can insert any JavaScript I like as a text field.
I use that to insert the Google Analytics Tag code on pages where it's needed and then fire back GA Events to the site that launched the survey.
I can add the GA tag code into the Look & Feel> General> Edit Header. That's working and I see page loads for the Survey URL.
If I add JavaScript to a question and paste in the Event call it fails ... silently.
I know the code block runs because the console message shows up.
e.g.
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
console.log("Onload ran");
ga('send', {
 hitType: 'event',
 eventCategory: 'Videos',
 eventAction: 'play',
 eventLabel: 'Fall Campaign'
});
});

Any thoughts would be appreciated on firing an Google Analytics Event from within the survey
- many thanks for reading.
Andy

hey man, any luck with this?


Leave a Reply