With Google Tag Manager it is possible to integrate surveys into websites without changing the websites code. This is valuable if the survey changes frequently or the integration scenarios are complex. One example for a complex setup is page or country based surveys.
Timer triggered survey
Timer triggers are used if a survey shall be displayed after some amount of time. To achieve this, the following steps need to be configured:
Create a timer with the desired delay (interval) and a limit of 1. The timer could be restricted to dedicated pages or to an entire host, like shown in the image below
Button triggered survey
To inject a button with an action the following steps need to be followed:
Create a page load trigger which is fired when the webpage has been loaded.
When this trigger is fired the following tag is needed to create the button as well as the popup.
As a next step the click trigger needs to be defined and wired to the ID defined on the button.
Finally another HTML Tag is needed which is fired by the click trigger. On the click the popup is opened.
Page specific survey
For page specific surveys a page view trigger is needed. In the image below it has been configured for the “sales” page.
The custom HTML Tag to inject the survey is the same as for the previous scenarios.
Country specific survey
Google Tag Manager doesn’t support Country, Region or City specific Triggers by default. Nevertheless there are providers like IPInfo which provides location information based on the IP address. To integrate this into Google Tag Manager the following steps are required:
Create a page load trigger.
In the Custom HTML Tag the call to IPInfo has to be implemented and the response needs to be evaluated. The Service returns country, region and city as well as other attributes. These attributes need to be used to distinguish he location based survey as shown in the switch statement of the following image.