1

I have a form using clickdimensions from which I would like to track which pages the form is being submitted on (it appears on almost every page on the site)

I have code set up to push an event to the dataLayer when the form submit occurs. This part appears to work just fine, a custom event trigger in tag manager picks it up.

A universal analytics tag attached to this trigger to record the event to analytics never seems to work though. The event is not recorded, but I have tested by swapping the analytics tag for a custom html tag that just prints a message to the log and the same trigger works just fine(!). It's only the part where GA comes into play that it's all failing and I have no clue why. I use other GA event tags just fine, I do not know why this particular case is failing. The GA setting are stored in a GA variable which is used throughout.

Ive also tried experimenting with the tag sequencing (just custom html tags to console.log little debug messages). In this case, a before (or set-up) tag will indeed fire in the GA event tag, but the after (clean-up) tag will not (thats with the "Don't fire after tag if tagname fails or is paused" checked), so clearly the GA tag is failing for some reason.

At tearing out hair point, so hope someone has some advice as to what might be happening?

Trigger setup: enter image description here

Tag setup: enter image description here

JQuery to fire when form is successfully submitted:

clickd_jquery(document).on('submit','#clickdimensionsForm',function(){
  window.dataLayer = window.dataLayer || [];
   window.dataLayer.push({
       'event': 'Enewsignup_form_submitted'
   });
   console.log("signup event recorded")
});

  • Welcome to Webmasters! – closetnoc Sep 27 '19 at 1:53
  • Can you say a little more or add a screenshot of your tag setup? In particular, where are the values for Event Category/Action/Label coming from? It does sound like it's got to be your tag so I wonder whether something that is setting those values might be erroring. – Reve Oct 2 '19 at 16:35
  • added screens of tag setup and code. – feroxy Oct 7 '19 at 13:59
  • Do you use GTM's preview mode? You can see all of your tags and whether they fired or not on each event -- and why. You have to select the correct event in the preview sidebar to get the data (the action on which the tag ought to fire, as opposed to Page Load or other steps); your tags will be listed in fired/not fired sections and you can click on any of them tags for more detail. Google Tag Assistant (add-on for Chrome) might also be helpful: start a recording, load the page, and submit the form. Then stop the recording and view the report. – Reve Oct 11 '19 at 17:49
  • Tag Assistant will only show GA tags, but it shows you both the parsed-out data and the actual URL getting hit to send the data, which can be helpful. Your setup looks correct, so my only suggestion is to see if preview or tag assistant turns up more clues. – Reve Oct 11 '19 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.