Google analytics for Inquiry form submission

Hi all -

We're struggling to get Google Analyitics to record when an Inquiry form has been submitted. We have added the code below to Inquiry Form>Edit> Confirmation>Section Settings>Head Tracking Code>

<script>
ga('send', 'event', 'inquiry', 'admission');
console.log('test form');
</script>

But we still don't see the result in GA when a form has been submitted. What are we doing wrong? We tried it in both Body Tracking Code & Head tracking Code. Can anyone tell me if the script is right?

Thanks!

Comments

  • Hi Kathy!

    Are you placing that tracking code in the inquiry form itself or on the inquiry form page? I know that Google Analytics will work in the header or body of the page itself, but I'm not as familiar with placing the code within the actual inquiry form.

    You may want to reach out to support and make sure you let them know the Google Analytics account number and version and see if they can spot the issue there.

    I also know there can be up to a 24-hour delay when it comes to GA updating, so if you're experiencing a lag it could just be that expected delay. Good luck!

  • Hi there, this is the syntax for the form tracking. There is a place for header and body snippets in the form's confirmation page settings. Cheers!

    Header

    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','your GTM code with GTM-');</script>
    <!-- End Google Tag Manager -->

    Body

    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=your GTM code with GTM-"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->

  • Thank you, Angie - we'll try it today. ?

  • Hi Jess -

    Thank you for this. We are able to track individual pages - it's the forms submissions that don't track. If you use the Inquiry form for example you have to put code (such as Angie offered and as I tried previously) directly into a dedicated space on the form's confirmation. I'm going to give Angie's syntax a try today and fingers crossed that it will work!

    Thank you for your help!

  • We had to do some MAJOR coding acrobatics to get this to work. We had to create iFrame cross domain capture code in Tag Manager, then pass the event to Google Analytics. This is still not ideal but it is better than nothing. Unfortunately, with the advent of G4, it looks like this will need to change again. Are there any plans to enable inquiry forms without using an iFrame?

  • @Angie Addison What should we see in Google Analytics? I have had this in place for year and it never worked. I had to go with a consultant to implement the cross domain tracking. I hired another consultant to convert us to GA4 and he broke the solution I previously had in place. He was not able to fix it and was not able to get the data to show in GA4.

  • @Anita Pinkerton We've just now implemented Enrollment Management. I'm curious to know if anyone has found a good solution for this. I use Google Tag Manager. I've tried to set a trigger in Google Tag Manager for Element Visibility. It requires that I grab unique CSS code in order to trigger the tracking. As of yet - I have not been successful - not sure if it's my not plugging in the right selector or not.

    It would be great if Blackbaud could change its form confirmation to be a unique URL (new page) - it should make tracking inquiry form submissions and all other form submissions much easier. I see that you have been active with this on the Ideas page and that it is indicated as “Implemented”. I've communicated my concerns to our rep who has been training our admissions people. For others who may be reading this – it would be a good time to comment on that Ideas board if you're still having trouble. If you've found a solution - I'd like to know what it is.

  • @Kathy Taylor I think the solution in the idea portal works if your site is a Blackbaud hosted site. Our site is not hosted on Blackbaud so we are actually tracking from a different domain. Here is the info on cross domain tracking with iframes:

    I am NOT a Tag Manager expert, so I had to hire one to implement this for me. At the end of the day, we see the submissions as an event in Google Analytics and process it from there running analytics reports to see source/medium and time of day. I actually go back into the inquiry and manually add the source in the contact card (we added an Admin View Only field for Lead Source) so I can add it to reports I run from Blackbaud. It's a very manual process, but it gets us what we need. I wish I could be more helpful.