Jump to content

Add Purchase conversion for Google Ads

Go to solution Solved by paul2009,

Recommended Posts

Hello. 

I want to add "Purchase" Conversion action for Google Ads. I followed Google Advisor's instruction to add the below code in ORDER CONFIRMATION PAGE. However, after testing, it show purchase "conversion action wasn't detected". The Google advisor cannot solve the problem and asked me to check with Squarespace. Anyone can help? Thanks a lot!

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-XXXXXXXX');
</script>

<!-- Event snippet for Purchase conversion page -->
<script>
    gtag('event', 'conversion', {
        'send_to': 'AW-XXXXXXXX/bOYUCMfU340YENnU-8YC',
        'value': {orderGrandTotal},
        'currency': 'GBP',
        'transaction_id': '{orderID}'
    });
</script>

Edited by PaulLam
typing mistake
Link to comment
  • Replies 3
  • Views 2.2k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
On 2/24/2023 at 12:12 PM, PaulLam said:

I followed Google Advisor's instruction to add the below code in ORDER CONFIRMATION PAGE.

Some changes to the Order Confirmation page recently and it is now necessary to add your code to the the Order Status page too if you want to track purchases of physical, digital, and/or service products. See Customising the Squarespace order confirmation page.

Did this help? Please give feedback by clicking an icon below  ⬇️

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
On 2/24/2023 at 12:26 PM, paul2009 said:

Some changes to the Order Confirmation page recently and it is now necessary to add your code to the the Order Status page too if you want to track purchases of physical, digital, and/or service products. See Customising the Squarespace order confirmation page.

Did this help? Please give feedback by clicking an icon below  ⬇️

Hi Paul, Thank you so much for your help. I will try it out!

Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.