Setting up Tracking Codes
You can set up tracking codes within your Architect site in order to analyze site visitor activity. This document provides overviews for the following tracking solutions:
- Google Tag Manager
- Google AdWords
- Google Analytics
- Facebook Pixel
Note: In order to set these codes up, you must obtain your individual code snippet from each specific service. For information on how to get these, visit the relevant websites.
Google Tag Manager
To use Tag Manager for tracking, obtain the relevant code from Google. This code should include two sections: a script and a noscript.
Note: this code is just an example; you will need to obtain your individual code snippet.
Script
<!– Google Tag Manager –>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-XXXX’);</script>
<!– End Google Tag Manager –>
Noscript
<!– Google Tag Manager (noscript) –>
<noscript><iframe src=”https://www.googletagmanager.com/ns.html?id=GTM-XXXX”
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
<!– End Google Tag Manager (noscript) –>
To add this code into your site, click “Settings” in the left section, and select “Header HTML.”
Paste the script portion of the code in this section and save.
Then go back up to the “body end HTML" field and paste the noscript portion of the code and click save.
NOTES
- Google suggests placing the noscript code at the beginning of the body section; we have tested placing the code in the body-end.html section and recommend this.
- For any questions regarding Tag Manager, contact Google.
To add Google AdWords tracking, obtain the relevant code from Google.
Note: this code is just an example; you will need to obtain your individual code snippet.
<!– Google Code for Add to Cart Conversion Page
In your html page, add the snippet and call
goog_report_conversion
when someone clicks on the chosen link or button. –>
<script type=”text/javascript”>
/* <![CDATA[ */
goog_snippet_vars = function() {
var w = window;
w.google_conversion_id = 12345678;
w.google_conversion_label = “abcDeFGHIJklmN0PQ”;
w.google_conversion_value = 13.00;
w.google_conversion_currency = “USD”;
w.google_remarketing_only = false;
}
// DO NOT CHANGE THE CODE BELOW.
goog_report_conversion = function(url) {
goog_snippet_vars();
window.google_conversion_format = “3”;
var opt = new Object();
opt.onload_callback = function() {
if (typeof(url) != ‘undefined’) {
window.location = url;
}
}
var conv_handler = window[‘google_trackConversion’];
if (typeof(conv_handler) == ‘function’) {
conv_handler(opt);
}
}
/* ]]> */
</script>
<script type=”text/javascript”
src=”//www.googleadservices.com/pagead/conversion_async.js”>
</script>
To add this code into your site, click “Settings” in the left section, and select “Header HTML.” Paste the script portion of the code in this section and save.
After the code has been added to the header HTML section, you can then add the code to the specific widget you want to track. E.g. if you want to track a button click, right click the button, and select “Edit HTML/CSS.”
This will open the HTML for the button widget. Locate the <a> tag and paste the following snippet here:
onclick=”;return try{goog_report_conversion(‘http://example.com/your-link’)}catch(e){}”
NOTES
- Google suggests using:
onclick=”goog_report_conversion (‘http://example.com/your-link’)”
The snippet included in this section, allows us to track Architect stats.
- For any questions regarding AdWords, contact Google.
Google Analytics
You can add Google Analytics to track specific widgets. First ensure that you have set up Google Analytics on your site.
Once this is set up, you can add the tracking to individual widgets. Simply right click the relevant widget, click “Edit HTML/CSS” and enter the Google Analytics code in the HTML section.
The code you receive from Google will not work as-is; it must be modified to specify the Google Analytics account it will be reported to. To do this, simply add “c.” to the code.
Initial code
onClick=”_gaq.push([‘_trackEvent’, ‘whitepaper’, ‘download’, ‘SEO is great’, 5, true]);”
Modified code
onClick=”_gaq.push([‘c._trackEvent’, ‘whitepaper’, ‘download’, ‘SEO is great’, 5, true]);”
Add this modified code and click save.
NOTES
- Ensure you have added “c.” otherwise the event will not be tracked.
- For any questions regarding Analytics, contact Google.
Facebook Pixel
You can add the Facebook tracking pixel to your site. First create your individual code.
To add this code into your site, click “Settings” in the left section, and select “Header HTML.” Paste the script portion of the code in this section and save.
Paste your Facebook pixel code here and click save.