WEMASY sends shop events such as viewing a product and adding to cart to Google Analytics 4 from the visitor's browser. Advanced ecommerce tracking adds purchases and refunds sent from the server, so they are counted even when an ad blocker stops the browser events.
What you need
- A Google Analytics 4 property for your site.
- Your GA4 Measurement ID, which starts with G-.
- A GA4 API Secret for the Measurement Protocol.
Find the values in Google Analytics
- Open Google Analytics.
- Click Admin.
- Under Property, click Data Streams.
- Click your web data stream.
- Copy the Measurement ID.
- Click Measurement Protocol API secrets.
- Click Create and give the secret a nickname.
- Copy the Secret value.
Turn on advanced tracking
- Click the configuration icon next to the project switcher in WEMASY.
- Click the Webshop tab.
- Find Advanced Ecommerce Tracking.
- Paste the GA4 Measurement ID.
- Paste the GA4 API Secret.
- Click Submit.
Click How to get these values? in the same section for the steps with screenshots.
What changes
- Purchase and refund events are sent from the server.
- Purchases are counted even when the visitor blocks tracking scripts.
- Refunds you record in WEMASY are reported to Google Analytics.
Tip: Place a test order after you save the values and check the purchase in the real-time report of Google Analytics. For order refunds, see Orders, fulfillment, and quotes. For product feeds, see Export feeds for advertising.
Frequently asked questions
Do I need this for basic shop tracking?
No. The browser events are sent by default. Advanced tracking adds purchases and refunds from the server.
Where do I keep the API secret?
Only in this WEMASY setting. Do not paste it into your site code.