Skip to content

Ads

Ads publishes campaigns to Google Ads, Meta (Facebook and Instagram), TikTok, LinkedIn, Microsoft Advertising and Pinterest and counts what they earn. This page covers what it does beyond publishing: leads, audiences, purchase events, importing, attribution and tagging links. Every operation needs ads:read or ads:write; amounts are in the workspace currency’s minor units, converted at each platform with the day’s rate when its account bills in another.

A lead ad’s form is filled in inside Meta, LinkedIn or TikTok. Each lead finds or adds its contact by the duplicate rule (source “Lead ad”), lands on the contact’s timeline, and starts the Form submitted trigger as the form Meta lead ad, LinkedIn lead ad or TikTok lead ad, with the form’s answers as its fields. A platform’s test lead is listed and makes nothing. Google Ads lead forms work the same way from the Google Ads integration page.

POST /api/v1/ads/lead-ads/{platform} turns a platform’s lead ads on for its chosen ad account, and DELETE /api/v1/ads/lead-ads/{platform} turns them off; leads already in stay. GET /api/v1/ads/lead-ads says which are on and lists the latest leads.

Platform How leads arrive Needs
Meta The ad account’s Facebook Page is subscribed to the app’s leadgen webhook; Digize reads each lead with the Page’s token. Fields the Page has for Messenger stay. The leads_retrieval and pages_manage_metadata permissions: connect Meta again from Ads › Settings › Lead ads.
LinkedIn A Lead Sync notification subscription on the ad account posts each new lead to the workspace’s webhook, which answers LinkedIn’s challenge and checks its X-LI-Signature; Digize reads the lead form response and names each answer by its question. The r_marketing_leadgen_automation permission, and Lead Sync access on the app.
TikTok A lead subscription posts each lead to the workspace’s own callback URL, which carries a key kept sealed in the workspace. Nothing more than the Ads connection.

An audience is a customer list on each platform it’s synced to, sent as SHA-256 hashes of emails and phone numbers, never the addresses themselves. POST /api/v1/ads/audiences makes one from:

  • A CRM segment or list: a tag, buyers, recent or lapsed buyers, big spenders, or any smart or static list (rule: "list:<id>", from GET /api/v1/ads/audiences/options).
  • Site visitors (retargeting): the known contacts among your sites’ visitors who saw a page or one under it, reached an outcome (left a checkout unpaid, started one, bought, sent a form, booked) or visited at all, in the last 1 to 90 days. A visitor is known once a form or checkout they sent carried their visitor id; only known visitors can be sent, since the platforms match on hashed emails and phones.
  • A lookalike of one of those, on Meta, TikTok or Pinterest.
Terminal window
curl -X POST https://digize.com/api/v1/ads/audiences \
-H "x-api-key: $DIGIZE_API_KEY" \
-H "content-type: application/json" \
-d '{"name":"Left a checkout","source":"visitors","visitors":{"by":"outcome","outcome":"checkout_abandoned","days":14},"platforms":["meta","google"]}'

Segment and visitor audiences are sent again every day: only who joined and who left go.

Digize doesn’t add the platforms’ browser tags (Meta’s pixel, TikTok’s pixel, LinkedIn’s Insight Tag, Pinterest’s tag, the Google Ads tag) to sites. Add them in Google Tag Manager, which is on every site once it’s connected.

Every paid order goes to Meta, TikTok, LinkedIn and Pinterest from the server through their conversions APIs, once the platform’s account is chosen and its conversions API is on in PATCH /api/v1/ads/settings (conversionApis). It goes where that platform’s click conversions go: Meta’s and TikTok’s pixel, LinkedIn’s conversion rule, Pinterest’s account. Each is matched on the customer’s hashed email and phone, with the order’s id as the event id, so a Tag Manager tag that sends the same Purchase with the order’s id as its event id is counted once. An order one of the platform’s ad clicks brought goes as that click’s conversion instead.

GET /api/v1/ads/accounts/{platform}/campaigns lists the campaigns in a platform’s chosen account with their last 30 days, and POST /api/v1/ads/accounts/{platform}/campaigns/import brings chosen ones in with their ad groups, ads (with their words, links and pictures where the platform gives them) and figures, to pause, resume, change budgets and end from Digize; the hourly sync keeps them up to date. Every platform imports: Google Ads, Meta, TikTok, LinkedIn (a campaign group is a campaign, its campaigns its ad groups), Microsoft Advertising (search campaigns, with keywords) and Pinterest. With tracking, Google Ads campaigns get Digize’s parameters in their final URL suffix; the other platforms’ clicks are credited by their own click ids.

GET /api/v1/ads/attribution credits each sale, lead and booking from your sites over the last 7 to 90 days to the visits by the same visitor before it, under four models:

Model Credit
first All of it to the first visit.
last All of it to the visit right before.
linear Shared alike by every visit before, up to 20.
position 40% each to the first and last visit, 20% shared by those between.

A visit counts as its Digize campaign (from the ad id and campaign name Ads’ UTM template adds), else its ad platform (from its click id), else its UTM source and campaign, else its channel. Each row carries its credit under every model, and a campaign its spend over the same days. It needs the sites’ event table; where that isn’t set up the report says so in unavailable.

Ads › UTM builder tags any link with utm_source, utm_medium, utm_campaign, utm_term and utm_content (lower case, spaces as dashes), so the visits it brings are named in Analytics › Campaigns and in attribution, and can make it a short link (POST /api/v1/ads/short-links). Ads published from Digize are tagged on their own by Ads settings’ UTM template.

Click protection and Microsoft Advertising

Section titled “Click protection and Microsoft Advertising”

Blocked addresses go to Google Ads campaigns as IP exclusions on each sync. Microsoft Advertising’s API has no IP exclusions, so Ads › Settings › Block list copies its IPv4 addresses (and /24 ranges as a.b.c.*), at most 100, in Microsoft’s format to paste into a campaign’s settings there.