• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

UpBuild

Values-Driven Technical Marketing

  • About
    • Mission & Values
    • Meet the Team
    • Be a Builder & Work at UpBuild
    • Offices & Location
  • Expertise & Services
    • SEO
    • Analytics
    • CRO
    • Custom Training & Education
    • Technical Marketing
  • Working With Us
    • Pricing
    • Non-Negotiables
    • Case Study: Zoomdata
    • Case Study: Indow
    • Case Study: Twistlock
  • Blog
  • Contact

Super Simple Formstack for Salesforce Google Analytics Tracking

August 5, 2019 by Laura McDougall Leave a Comment

Formstack for Salesforce

Formstack is a great little online form solution that integrates nicely with Salesforce. When you’re managing your inbound CRM via Salesforce, you can use Formstack to build native Salesforce forms on your website that will feed submissions directly into Salesforce. What we want here is an additional piece of the equation, connecting that form submission to our Google Analytics data.

The Problem:

Because the Formstack form itself is embedded on the webpage via JavaScript, things can get overcomplicated in a hurry. In typical UpBuild fashion, we’ve rigged up some quick instructions for how to implement Google Analytics event and conversion tracking on the Formstack integration for Salesforce via Google Tag Manager.

The Solution:

There are two key pieces of this implementation. The first will be done by simply pasting some JavaScript within the Form Settings section of Salesforce and the second will be, you guessed it, by deploying a tag via Google Tag Manager.

Part 1: Salesforce & Formstack

Hop into an individual form via the Formstack app and click “Edit”

Open up “Form Settings”

Scroll down to “Javascript Code”

This section is always a lovely addition and enabler for applying more tracking and something that I use more and more frequently across CRM solutions!

Add in a dataLayer push in the Javascript Code section that looks something like this (Fill in your form’s name under “form:”) All this code does is let Formstack know that when a form is submitted, it should push an event called “formSubmission” to the dataLayer, along with the name of the form.

function FF_OnAfterSave() {
dataLayer.push({
event: “formSubmission”,
form: “{Name of Form}”
});
}

Here’s an example of what it might look like:

Go ahead and save that, and let’s continue to step 2.

Step 2: Google Tag Manager

Move on over to your Google Tag Manager Workspace, and let’s get a tag set up that will connect the dots once the Formstack form is submitted and our ‘formSubmission’ event is pushed to the data layer.

Create a new Custom Event Trigger called ‘formSubmission’:

Create a new GTM Tag using the following settings:

Tag Type: Google Analytics: Universal Analytics
Track Type: Event
Category: Form Submission
Action: {{Page Path}}

Set this tag to fire on the formSubmission Trigger that we set up in the previous step.

That tag should end up looking something like this:

Test it out

Submit the form on your site and test it out in GTM preview mode and in your unfiltered Google Analytics View in the Realtime Report.

A formSubmission event should be triggered, and our Lead Form Submission tag should be fired once a form is successfully submitted. Preview Mode should look like this:

As tools and platforms like this remove more and more control over what you can and can’t do with your data, there’s almost always a workaround to connect what you need. Sometimes it just takes a little bit of JavaScript, GTM, and know-how to get it all humming along.

Related

Filed Under: Analytics

Stay in the Know

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Get Our Weekly Newsletter

Technical marketing news made simple, from UpBuild's expert team straight to your inbox.

* indicates required

Browse previous newsletters. It's good stuff.

Recent Thoughts

10 Steps to Maximize the SEO Value of Your Press Section [Guide]

April 15, 2021 By Mike Arnesen

3 Ways to Build Authority Online Without Link Outreach

April 2, 2021 By Gaby Gebo

Meta Description Length Testing Tool

March 9, 2021 By James McNulty

How to Vet a Link Builder

March 4, 2021 By Alex Ramadan

How To Find & Fix Layout Shifts with Chrome DevTools

February 25, 2021 By Danielle Rohe

In the Spotlight

Engagements

You don't have time to worry about technical marketing and SEO. We do, and what's more, we love doing it. If … [keep reading] about Engagements

Stay Connected

  • Facebook
  • LinkedIn
  • Twitter

Footer

Who We Are

We're geeks. Unashamed and idealistic. We're here to do innovative work that gets results for clients we're proud to partner with.

Learn more about us

Featured Blog Posts

10 Steps to Maximize the SEO Value of Your Press Section [Guide]

3 Ways to Build Authority Online Without Link Outreach

Meta Description Testing Tool

Meta Description Length Testing Tool

Newsletter

Sign up for our updates.

  • Home
  • About
  • Offices & Location
  • Contact

© Copyright 2021 UpBuild, LLC · All Rights Reserved · Proudly powered by WordPress