Advanced Postback Configuration
Customize postbacks for ad networks with advanced configuration methods.
Overview
After enabling basic configurations for your ad network postbacks, you may want to make more advanced edits to the configuration depending on your specific use case and what types of data you want to filter for your postback. In most cases, the default postback URL generated from your selections is sufficient to provide postback notification to interested parties. But sometimes you may need/want to edit or remove a parameter from the postback URL(s) or append a macro expression/variable to include additional information.
Advanced Postback Configuration Examples:
Goal | Reason(s) | Solution |
---|---|---|
Send your ad partner the actual items that the end-user adds to their cart. |
| Add Macros for Content Items: ${(content_items[0].$product_name)!} as the value to an ad-partner-provided query parameter key in the postback URL. |
Only send the INSTALL postback for specific agencies. | Only specific agency-run campaigns should be sending installs to the ad partner. | Add a Filters to the INSTALL postback template to specify which agency IDs to filter for. |
Only send a PURCHASE postback for a specific coupon. | Because you have many different coupon codes, you only want to send one type. | Add a Custom Filter to the PURCHASE postback template to specify which coupon string is applied to a given PURCHASE event to filter for. |
Adding/Editing Macros
Postback macros are key/value pairs appended to a postback URL as query parameters. With it, ad partners will receive specific data points about the postback to help optimize campaigns. To view all available macros, view our guide on Postback Macros & Functions here.
Add Pre-built Macros
You can select a postback URL key from a pre-built list. Once you add your key, the postback macro will be auto-filled. To add a pre-built macro:
- Under Partner Management, select the partner for whom you want to add/edit their postback.
- Hover on the three dots icon to the right of the postback and click Advanced Edit.
- An Edit Postback modal will pop up and you can add pre-built macros in the Add Pre-built Macros section. Click the + Add Pre-built Macro button.
- Click Save after you finish making macro edits.
Free Form Edit
If you want to have full control of your postback macros, you can make direct edits through a free-form field. To make a free form edit to a postback URL:
- Under Partner Management, select the partner for whom you want to add/edit their postback.
- Hover on the three dots icon to the right of the postback and click Advanced Edit.
- An Edit Postback modal will pop up and you can make edits to the Free Form Edit field by adding/editing/removing the key-value pairs necessary.
- You must include an
&
character before each key-value pair you append.
- You must include an
- Click Save after you finish adding your desired macros.
Custom Macros
You can also create any custom macro for your postback URL with any key-value pair. To add a custom macro:
- Under Partner Management, select the partner for whom you want to add/edit their postback.
- Hover on the three dots icon to the right of the postback and click Advanced Edit.
- An Edit Postback modal will pop up and you can add custom macros to the Add Custom Macros section. Click the + Add Custom Macro button.
- Click Save after you finish adding your desired macros.
Adding Filters
In order to add a filter, you need to update the postback template:
- Under Partner Management, select the partner for whom you want to add/edit their postback.
- Hover on the three dots icon to the right of the postback and click Advanced Edit.
- An Edit postback modal will pop up
- Go to the Filters tab. Click the + Add New Filter button.
- Edit your filter Comparitor and Value(s)
- Click Save to apply the filter.
Custom Filters
Custom filters allow you to leverage a wide variety of data points like link data, user data, and event data. Format and spelling are crucial to making sure custom filters work properly, so make sure you've taken a look at the data format.
Creating a custom filter is similar to adding a standard filter. You must select Custom when adding a filter.
- Type in the key that you'd like to filter on
- You can find all of the keys here. Depending on the key you are filtering on, it may be part of the top-level data (ex.
timestamp
or it may be nested (ex.event_data.coupon
)
- You can find all of the keys here. Depending on the key you are filtering on, it may be part of the top-level data (ex.
- Set the filter logic (equals or not equals)
- Set the input values.
Using HTTP POST Method
By default, Branch sends postbacks via the HTTP GET
method. You can, however, choose to have the postback sent via the HTTP POST
method instead.
To change the HTTP method to POST:
- Under Partner Management, select the partner for whom you want to add/edit their postback.
- Hover on the three dots icon to the right of the postback and click Advanced Edit.
- An Edit postback modal will pop up
- Go to the Filters tab.
- In the Postback Details section, change the HTTP method from GET to POST.
- In the Headers tab, click the + Add New Header button to add new headers.
- In the Body tab, add any other Freemarker expressions you'd like.
- In the Filters tab, add any filters you'd like.
- Click Save.
Updated about 1 year ago