Save site piggyback
Creates a new piggyback tracking pixel and attaches it to the specified site, or with 'id' edits that existing piggyback of the site.
https://YOUR-NETWORK-DOMAIN/rest-api/piggyback/site.do Creates a new piggyback tracking pixel and attaches it to the specified site, or with 'id' edits that existing piggyback of the site. The piggyback can be of type BEACON (HTML tracking code snippet) or URL (redirect URL), specified via the model attribute fields 'type' and 'codeUrl'. You can target a specific action by providing actionId, or set allActions to true to apply to all actions. Optionally associate the piggyback with a specific campaign. The caller must have update permissions on the site. Returns a JSON object with a 'success' boolean and validation errors if any.
Form Params
siteId integer required
The unique numeric identifier of the site to attach the new piggyback tracking pixel to
3001 actionId integer
Conditionally required — when allActions is false; ignored when it is true. The unique numeric identifier of the action to attach the piggyback to
101 allActions boolean
When true, the piggyback is applied to all actions, making actionId unnecessary
true campaignId integer
Optional campaign ID to associate the piggyback with a specific campaign
2001 id integer
ID of an existing piggyback of this site to edit instead of creating a new one; one that is not the site's answers 400
701 active boolean
Whether this piggyback is active
true codeUrl string
Piggyback URL or HTML/JavaScript code
https://tracker.example.com/pixel?sid=456 deliveryAttribution string
Which conversions this piggyback fires for: ALL, POST_CLICK_ONLY or POST_VIEW_ONLY
ALL sampling integer
Sampling rate percentage (0-100) controlling how often the piggyback fires
100 type string
Piggyback type: URL (a URL fired as a pixel) or BEACON (an HTML/JavaScript snippet)
URL Responses
200
Site piggyback saved successfully
400
Bad request — invalid or missing parameters
401
Unauthorized - authentication error
403
Forbidden - no update rights on the site, or the Piggyback Pixel Tracking permission is not enabled
500
Internal server error