Documentation
Server-Side Purchase Events
Count every online booking in GA4, even when the browser event is missed
Browser tags only see a booking when the confirmation screen loads in the customer’s browser. A customer who closes the page right after paying, uses an ad blocker, or signs their service agreement later from the email link never fires it, and that booking is missing from Google Analytics. With server-side purchase events on, PestBooker also reports each booking to your GA4 property directly, as a purchase with the booking’s value, once the booking is confirmed (or once the customer signs, if you require a signature). It uses the same transaction ID as your browser event, so a booking both paths report counts once.
Requirements
- A GA4 property and its web data stream for your website (Measurement ID G-XXXXXXXXXX)
- Editor access in GA4 to create a Measurement Protocol API secret
- Admin role in PestBooker
- About 5 minutes
What happens on each booking
Booking confirmed
or signed, if a signature is required
PestBooker sends
a purchase to your GA4
GA4 matches
the customer's visit and source
One purchase
even if your browser tag also fired
Create an API Secret in Google Analytics
- In GA4, go to Admin → Data streams and open your website’s stream
- Copy the Measurement ID (starts with G-)
- Open Measurement Protocol API secrets, click Create, give it a name like "PestBooker", and copy the Secret value
- Keep the secret private: paste it straight into PestBooker in the next step instead of sending it by email
Turn It On in PestBooker
- Go to Dashboard → Integrations → Google Analytics & Tag Manager → Server-side purchase events
- Paste the Measurement ID and the API secret
- Turn on "Send purchases from the server". Turn on "Show in DebugView" too while you check the first few bookings.
- Click Save Changes. The secret is stored encrypted and is never shown again, only its last four characters.
Check It Works
- Click Send test. It sends one event named pestbooker_test (not a purchase, no revenue) to your DebugView.
- In GA4, open Admin → DebugView. If pestbooker_test appears within a minute, the ID and secret match.
- On your next real booking, a purchase appears in DebugView with the booking’s transaction ID, and the booking shows under "Recent purchases sent" on the same PestBooker page.
- Once you’re happy, turn DebugView off so purchases flow into your standard reports.
Make Sure GA4 Counts Each Booking Once
- GA4 counts two purchases with the same transaction ID as one, but only when both are named purchase.
- The booking form’s browser event is registration_completed. If your Tag Manager sends it to GA4 as a purchase with transaction_id set to the order ID, you are covered.
- If your browser tag sends some other event as your conversion, mark only one of the two as a key event in GA4, or every booking that reaches the confirmation screen counts twice.
Know What Is Sent
purchase: event nametransaction_id: the order ID, the same as your browser eventvalue, currency: the initial service price, in USDitems: the plan name and priceclient_id, session_id: the customer’s Google Analytics visit, so the booking keeps its source (for example a Google Ads or Thumbtack click)booking_flow, signed_later, office: extra details. To report on them, register them as custom dimensions in GA4.- No name, email, phone or address is ever sent. Google does not allow personal data in GA4.
Pro Tips
- • For an embedded form, the customer’s visit is read from your website’s own Google Analytics cookies, so the booking stays tied to how they found you.
- • If no Google Analytics visit was found (GA isn’t on the page, or cookies were blocked), the purchase still counts but shows with no source. "Recent purchases sent" marks these "Visit matched: No".
- • If Google can’t be reached, PestBooker keeps retrying each hour for up to 72 hours, and the purchase is still dated to when the booking happened.
- • Each booking is reported once, however it was completed.
Need help with setup?
Email us and we'll walk you through any integration or setup process.
Contact Sales