How to Add Tracking Codes and Analytics

Updated
Feature Availability User Permissions Time to Complete Skill Level
Philippine and US stores on Launch, Grow, Scale and the free trial Store owner, or a team member with Store settings & administration access About 10 minutes Intermediate

Summary

Overview: Scripts & Analytics lets you paste tracking codes and other scripts into your online store, such as Google Analytics, the Google tag, Facebook Pixel, chat widgets or meta tags. You can also add a conversion snippet that runs only after a customer places an order, with the real order ID and total filled in.

Prerequisites:

  • The code snippet from your tracking provider (for example Google Analytics, Google Ads or Meta Events Manager).

Step-by-Step Instructions

Step 1: Open Scripts & Analytics

  1. In the left sidebar, go to Settings → Store.
  2. In the Store Settings menu, click Scripts & Analytics.

Step 2: Paste your codes

The section has three boxes:

Box What it's for Where it runs
Head Scripts that need to load with the page, like Google Analytics, the Google tag, Facebook Pixel or SEO meta tags The head of every page of your online store
Footer End-of-page scripts, like conversion tracking, chat widgets or other non-essential scripts The bottom of every page of your online store
Order Confirmation Conversion snippets, like a Google Ads conversion event Only the order confirmation page, after a customer places an order
  1. Paste each code, including its <script> tags, into the right box.
  2. In Order Confirmation, you can use these placeholders. They are replaced with the order's values:
    • {{order_id}}
    • {{order_total}}
    • {{subtotal}}
    • {{currency}}
  3. Click Save. You see Successfully added JavaScript snippets to your store.

Example: Google Ads conversion tracking

  1. Paste the Google tag loader (the gtag.js snippet from Google Ads) into Head.
  2. Paste the conversion event into Order Confirmation, using the placeholders for the value, currency and transaction ID:
<script>
  gtag('event', 'conversion', {
    'send_to': 'AW-XXXXXXXXXX/XXXXXXXXXXXXXXXXXX',
    'value': {{order_total}},
    'currency': '{{currency}}',
    'transaction_id': '{{order_id}}'
  });
</script>
  1. Replace AW-XXXXXXXXXX/XXXXXXXXXXXXXXXXXX with your own conversion ID and label, then click Save.

Verify It Worked

Success criteria:

  • After you reload Settings → Store, your codes are still in the boxes.
  • Your tracking provider's test or debug tool detects the code on your online store.
  • After a test order, your conversion appears in your ads account (this can take some time to show).

Troubleshooting

Common errors

  • An upgrade window opens when I click Save: your plan doesn't include Scripts & Analytics. See How to Choose a Prosperna Plan.
  • My tracking doesn't fire: check that you pasted the full snippet, including the opening and closing <script> tags, into the right box, and that you clicked Save.
  • The conversion value is wrong: use {{order_total}} in Order Confirmation instead of a fixed number.

Limitations & considerations

  • The conversion fires when the order is placed. For Cash on Delivery, Over-the-Counter and Direct Transfer orders, it runs before the payment is confirmed.
  • Code in these boxes runs on your live store. A broken script can affect how your pages look or work. Test after every change.
  • Your cookie notice controls Prosperna's own visitor tracking. Scripts you add here load whether or not a shopper accepts cookies. See How to Set Up Your Cookie Policy.

Next Steps & Related Resources


Need more help? For more information and assistance, please send an email to support@prosperna.com.

Last Updated: 10/09/2026