To configure SmartForms to work on pages utilizing GTM we will now be delivering 2 script tags to the customer. This is only for those wanting to place the tag in GTM. Below are instructions on the customer setting up our script tags.
Go to GTM dashboard -> On the left sidebar menu -> Click on Tags -> New
Name the Tag such as Leadspace SmartForms tag 1>Click on the Tag Configuration box> side bar will them open where you will choose Custom HTML
Place the below first SmartForms script inside the HTML box, you will receive this first script tag from your Leadspace resource, below is an example.
Create the second custom HTML tag with the script tag you receive from your Leadspace resource, an example is below, the Leadspace resource will include your customer token:
window.dataLayer = window.dataLayer || ;
‘token’ : ‘InsertCustomerTokenHere’,
In order it to work and not break, the customer will have to define this tag to be as high as possible under the head tag on the html page. They might have other scripts that pushes data to dataLayer and they can place this tag next to them.
Publish all changes