Squarespace: Difference between revisions
Jump to navigation
Jump to search
Created page with " A business Account or higher is required to install tag manager. == Install Tag Manager == Go to: <pre> Settings -> Advanced -> Code Injection </pre> Enter the GTM to the..." |
|||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
= Install Tag Manager = | |||
A business Account or higher is required to install tag manager. | A business Account or higher is required to install tag manager.<br /><br /> | ||
Go to: | Go to: | ||
| Line 11: | Line 10: | ||
Enter the GTM to the Head & Footer | Enter the GTM to the Head & Footer | ||
= Contact Form = | |||
On the contact form, click: | On the contact form, click: | ||
| Line 20: | Line 19: | ||
within the Post-Submit HTML field enter: | within the Post-Submit HTML field enter: | ||
<pre> | <pre> | ||
<script>var dataLayer = window.dataLayer || [];dataLayer.push({'event' : 'contact-form-submitted'});</script> | <script> | ||
var dataLayer = window.dataLayer || []; | |||
dataLayer.push({'event' : 'contact-form-submitted'}); | |||
</script> | |||
</pre> | |||
= Sales = | |||
Settings -> Advanced -> Code Injection </br> | |||
Scroll down to Order Confirmation Page & add the below:</br> | |||
<pre> | |||
<script> | |||
window.dataLayer = window.dataLayer || []; | |||
dataLayer.push({'order_id' : '{orderId}'}); | |||
dataLayer.push({'order_value' : '{orderGrandTotal}'}); | |||
dataLayer.push({'event' : 'order-submitted'}); | |||
</script> | |||
</pre> | </pre> | ||
Latest revision as of 10:02, 23 January 2025
Install Tag Manager
A business Account or higher is required to install tag manager.
Go to:
Settings -> Advanced -> Code Injection
Enter the GTM to the Head & Footer
Contact Form
On the contact form, click:
Edit -> Advanced
within the Post-Submit HTML field enter:
<script>
var dataLayer = window.dataLayer || [];
dataLayer.push({'event' : 'contact-form-submitted'});
</script>
Sales
Settings -> Advanced -> Code Injection
Scroll down to Order Confirmation Page & add the below:
<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({'order_id' : '{orderId}'});
dataLayer.push({'order_value' : '{orderGrandTotal}'});
dataLayer.push({'event' : 'order-submitted'});
</script>