The moment it happens
Report shop orders to Meta for better ad targeting
Every order is sent to your Meta pixel as a purchase, so your ads learn from real sales.
- Runs
- The moment it happens
- Apps
- Facebook Pages
- AI
- Not needed
- Access
- pixel access (ads_management or a CAPI token)
Send this to your assistant
Create a ClickRuntime automation: give me a link my shop can send new orders to. For each one, send a Purchase event with the order value, currency and hashed email and phone to my Meta pixel.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Meta's ad system learns from conversions, but browser tracking loses a share of them to ad blockers, privacy settings and cookie limits. When purchases or leads never reach Meta, the campaign optimizes on incomplete information, reports poor results and spends budget on the wrong audiences. Fixing that means sending events from your server, which most small teams cannot build alone. The cost is wasted ad budget that nobody can see.
When your shop or form sends a webhook for an order or lead, ClickRuntime receives it, normalizes the customer details, hashes them with SHA-256 as Meta requires, and posts the event to the Conversions API with an event ID so Meta can match it with browser events without counting twice.
It suits stores and lead-generation sites running Meta ads that want better attribution.
What you get out of it
Report conversions browsers miss
Server-side events arrive even when the browser blocked tracking. Meta sees more of the real purchases, so its reports and bidding rely on more of what actually happened. Attribution gaps shrink and reports line up with your own sales records.
Improve ad optimization
Meta's system targets people like those who convert. With complete conversion data, it finds better audiences, which can lower the cost of each lead or sale over time. Better data means better targeting without raising the budget.
Hash personal data properly
Email and phone details are normalized and hashed before leaving your systems, as Meta requires. Raw customer data is not sent in the clear, which supports your privacy obligations. That protects customers and keeps you on the right side of platform rules.
Avoid double counting
Each event carries an event ID matching the browser event, so Meta merges them rather than counting two sales. Your reported conversions stay accurate and trustworthy. Clean numbers make every later decision easier to trust, from budgets to creative.
Skip custom development
Building and hosting a server integration takes engineering time. Receiving a webhook and forwarding the event gets the benefit without maintaining code of your own. Your team keeps working on the shop, not plumbing for ads.
How it works
What happens, step by step
When your shop sends a new order to your ClickRuntime link, the automation runs straight away.
It scrambles the customer's email and phone number in the standard way Meta requires, so the raw details are never shared.
It sends the order to your Meta pixel as a purchase with its value and currency, so your ads learn from real sales.
Each order carries its own order number, so Meta counts it only once even if your website also reports it.
Before it runs live
- Connect Facebook Pages
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Facebook Pages steps into one automation
Under the hood
The code that runs this automation
import hashlib, time
from clickruntime import on_event, credentials, http
PIXEL_ID = "987654321000000"
def sha(value):
return [hashlib.sha256(value.strip().lower().encode()).hexdigest()] if value else []
@on_event
def handle(event):
order = event.json
customer = order.get("customer") or {}
phone = "".join(ch for ch in (customer.get("phone") or "") if ch.isdigit())
payload = [{"event_name": "Purchase", "event_time": int(time.time()), "event_id": str(order["id"]),
"action_source": "website",
"user_data": {"em": sha(order.get("email") or customer.get("email")), "ph": sha(phone)},
"custom_data": {"value": float(order["total_price"]), "currency": order["currency"]}}]
resp = http.post(f"https://graph.facebook.com/v21.0/{PIXEL_ID}/events",
json={"data": payload, "access_token": credentials.secret("META_CAPI_TOKEN")})
resp.raise_for_status()
return {"events_received": resp.json()["events_received"]}FAQ
Common questions
Which events can it send?
Do I need a Meta access token?
How do I check that events arrive?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Share new blog posts on your Page
When your site publishes an article, it appears on your Facebook Page as a link post.
See how it worksAnswer Messenger questions and hand off to you
People who message your Page get an answer from your FAQ straight away, and you're emailed when someone needs a person.
See how it worksPublish queued posts to Facebook and Instagram
You add images and captions whenever you like, and one goes out to your Page and Instagram at the same time each day.
See how it worksKeep exploring
Set up “Report shop orders to Meta for better ad targeting” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.