Jump to content

Inject Script for Tracking Product Conversions (from Unbounce)

Recommended Posts

Site URL: https://www.renovationsells.com/shop-design-boards/monroe-bath

Hello! Your help is much appreciated. 

I am using a tool called Unbounce to create landing pages for our digital products. You can view the draft version of a landing page here: http://unbouncepages.com/bathroom-design-boards/. We will run an ad campaign on Instagram/Facebook that drives users to the product landing page where they can learn about the product, click through to a product page on our Sqaurespace site, and purchase the download. To properly track these conversions, I need to inject a bit of script before the </body> tag on my final conversion pages. 

A few questions: 

1. Would the final conversion page be the product page? or the order confirmation page?

2. How do I add the script before the </body> tag on these pages? 

 

Here is the script I need to inject for tracking:

<script type="text/javascript">
  var _ubaq = _ubaq || [];
  _ubaq.push(['trackGoal', 'convert']);
   
  (function() {
  var ub_script = document.createElement('script');
  ub_script.type = 'text/javascript';
  ub_script.src =
  ('https:' == document.location.protocol ? 'https://' : 'http://') +
  'd3pkntwtp2ukl5.cloudfront.net/uba.js';
  var s = document.getElementsByTagName('script')[0];
  s.parentNode.insertBefore(ub_script, s);
  }) ();
  </script>

 

 

Link to comment
  • Replies 0
  • Views 615
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.