Welcome to our guide to installing Sprig with Google Tag Manager.
Sprig customers have access to in-product studies, which allow you to target studies at specific users directly in your product. Starter plan customers have access to web in-product studies while Enterprise customers have access to both mobile and web in-product studies. In-product studies do require installation, and there are a few ways you can do so
Let's start the GTM installation process by navigating to the Integrations page in Sprig and selecting installation.
If your team actively uses Google Tag Manager, this installation method is one of the fastest ways to get up and running in Sprig. This method also allows you to use your existing events and user attributes and pass them along to Sprig to use for study targeting.
Let’s run through installing with Google Tag Manager. To start, let's go ahead and open up your Google Tag Manager.
- Open Google Tag Manager app and click Variables.
- In User-Defined Variables, click New.
- In the Untitled Variable field, give the variable an appropriate name, like SPRIG_PROD_ENV_ID (if you are installing for your Production environment) or SPRIG_DEV_ENV_ID (if you are installing for your Development environment).
- Click anywhere on the Variable Configuration box, and scroll down the new sidebar to find Constant (under the Utilities subheading).
- Paste your Sprig Environment ID into the Value field and click Save.
A Tag in Google Tag Manager is a snippet of code that executes on web pages with Google Tag Manager installed. Sprig has created an installation tag, called Sprig Tag, which can be found in Google Tag Manager’s Community Template Gallery, and which you will now add to your Google Tag Manager account. This will execute the Sprig SDK on all pages on your website where you have Google Tag Manager installed.
Let’s run through that now:
- In Google Tag Manager click Tags.
- Click New to create a new tag.
- In the Untitled Tag field, give the tag an appropriate name, like Sprig Install Tag.
- Click anywhere on the Tag Configuration box, and click on Discover more tag types in the Community Template Gallery in the new sidebar. Search for Sprig, click on Sprig Tag, and then click Choose Template to confirm your selection.
- Click the plus icon and select the Environment Variable you created earlier (for example, SPRIG_PROD_ENV_ID or SPRIG_DEV_ENV_ID).
- Make sure the Action Type is set to Install.
- Click anywhere on the Triggering box below and select All Pages in the new sidebar.
- Click Save.
- Click Submit and then Publish to push your changes out to your website.
And there you have it! You’ve officially installed Sprig and are ready to launch targeted In-Product Surveys