You can measure behavioural data about your site with Google Analytics and Google Ads. Follow the steps in this article to set up your Google Analytics and Google Ads accounts with Square Online.
Before you begin
You’ll need to have your Google tag ID.
The instructions for setting up the Google tag with Square Online are different for tag IDs starting with 'AW-' (usually, Google Ads accounts) and tag IDs starting with 'G-' (usually, Google Analytics properties).
If you have a tag starting with 'AW-'
- Sign in to your Square account.
- On the left panel menu, click Online, then select Online in the pop-up menu.
- On the 'Online' page, click Settings, then select Tracking Tools from the drop-down.
- Under the 'Add custom header code' row, click Add new code.
- In the 'Add customer header code' pop-up window, enter a name for your custom code, then paste your Google tag into the 'Custom code' box.
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
- Under 'Where would you like to place this code'? confirm that the code is placed at the
<head>
. - Click Save.
If you have a tag starting with 'G-'
- Sign in to your Square account.
- On the left panel menu, click Online, then select Online in the pop-up menu.
- On the 'Online' page, click Settings, then select Tracking Tools from the drop-down.
- Under 'Google Analytics', enter your tag ID. Your changes will be saved automatically.