Google Analytics Events in a Survey? | XM Community

Google Analytics Events in a Survey?

  • 26 November 2020
  • 1 reply

Badge +1

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.
/*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.

1 reply

Badge +1

hey man, any luck with this?

Leave a Reply