Google Adwords Tracking

If you are thinking about use Google Adwords tracking on Strikingly's contact form, there are two way of doing it:

1. On-page tracking

Under this way, when your user submits the contact form, the conversion code gets executed. 

Step 1)

Copy the below code to the footer code of your page.

<script type="text/javascript">
/* <![CDATA[ */ 
(function() {
  var config = {
    google_conversion_id: YOUR_CONVERSION_ID,
    google_conversion_label: "YOUR_CONVERSION_LABEL",
    google_remarketing_only: false,
    google_custom_params: {}
  };
  var conversionFunc = function() {
    window.edit_page.Event.subscribe('Site.contactForm.submit', function() {
      window.google_trackConversion(config);
    });
  };
  if (typeof _strk != 'undefined') {
    _strk.push(['Page.didMount', conversionFunc]);
  } else {
    window.runAfterDomBinding.add("custom", conversionFunc);
  }
}());
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion_async.js" charset="utf-8"></script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/
YOUR_CONVERSION_ID/?label=YOUR_CONVERSION_LABEL&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
Step 2)
 
Create a conversion in Google Adwords panel, but don't copy the code from Google Adwords over. Find and replace YOUR_CONVERSION_ID and  YOUR_CONVERSION_LABEL from the above code to the values Google generated:
 
 
Step 3)
 
 
Save and publish the page.
 
2. New page tracking

Typically, this is used when you want to redirect the user to a success page with a new URL. You would have to create two pages:

Page A: page where you host the contact form
Page B: success page

You want to put this code in the Footer Code of Page A (make sure to replace SUCCESS_PAGE_URL):
<script type="text/javascript">
/* <![CDATA[ */
  (function() {
    var redirectionFunc = function() {
      window.edit_page.Event.subscribe('Site.contactForm.submit', function() {
        // redirect the page to success page
        window.location = "http://SUCCESS_PAGE_URL";
      });
    };
    if (typeof _strk != 'undefined') {
      _strk.push(['Page.didMount', redirectionFunc])
    } else {
      window.runAfterDomBinding.add('custom', redirectionFunc);
    }
  }()); 
/* ]]> */
</script>

and put the tracking code that Google generated in the Footer Code of Page B

In case you need assistance, shoot us a line at support@strikingly.com or chat with us.

 

 

Have more questions? Submit a request