Difference between revisions of "NATS For Networks Postback Examples"
(Created page with "{{NATS for Networks Manual | show_setup_section = true }} = Event Postbacks = NATS For Networks uses the 'process_pixel.php' script to record events. Below are the examples o...") |
|||
Line 59: | Line 59: | ||
*'' shipping_country '' | *'' shipping_country '' | ||
*'' phone '' | *'' phone '' | ||
− | + | *'' custom1 '' | |
+ | *'' custom2 '' | ||
+ | *'' custom3 '' | ||
+ | *'' custom4 '' | ||
+ | *'' custom5 '' | ||
''' If you send postbacks with different personal data for the same customer, NATS For Networks will take the latest information sent and update the customer record in question. ''' | ''' If you send postbacks with different personal data for the same customer, NATS For Networks will take the latest information sent and update the customer record in question. ''' |
Revision as of 14:14, 24 July 2018
Event Postbacks
NATS For Networks uses the 'process_pixel.php' script to record events. Below are the examples of different events you may need to send postbacks for, and what parameters are required to record each event type in NATS For Networks.
Conversion Postback
The first transaction for a customer is considered a "conversion". For conversions, the only required field is the 'click_hash' which was generated for a surfer when they went through one of our tracking links:
http://example.natsfornetworks.com/signup/process_pixel.php?click_hash={CLICK_HASH}
Although sending just click_hash will work for recording a conversion event, here are some optional parameters that are commonly sent:
- subscription_id - the Subscription ID is generally a unique customer identifier from your system. Sending a subscription_id allows you to tie future events to the same cusotmer record
- amount - This parameter is the amount of revenue your network made for the event. It will override the "Conversion Amount" defined on the offer. This allows you to record transactions for any amount rather than just the default amount for the offer. This value should be sent in the base currency for your network. The default is USD, but you can check your network's default in the Config Admin -> Currency - All page. This value should also be in decimal format. For example, if a transaction amount is $9.95, the amount should be sent as "&amount=9.95"
Continuity Postback
Any transaction for a customer after the initial conversion is considered a "continuity". (Ex: Recurring Subscriptions may have periodic continuity transactions sent)
http://example.natsfornetworks.com/signup/process_pixel.php?subscription_id={USER_ID}&orderid={TRANSACTION_ID}
For continuities, you must send at minimum the subscription_id (same as from conversion postback), and the orderid:
- subscription_id - the Subscription ID is generally a unique customer identifier from your system. Sending a subscription_id allows you to tie future events to the same cusotmer record
- orderid - The Order ID is generally a unique identifier for the transaction from your system. Sending us an identifier for your transactions helps us to ensure that if you accidentally send the same transaction postback multiple times, we will only record it once. It also helps with advertiser communication to find and reference transactions if disputes arise.
Goal Postback
For flexibility, NATS For Networks allows you to define your own custom events called "Goals". A common example that is added as a goal is a free registration or signup. When setting up a new Goal, you will be asked to define a "Goal Slug" (ex: freereg). This is slug is what you add to your postbacks to indicate that it is not a normal conversion event, but rather a custom event:
http://example.natsfornetworks.com/signup/process_pixel.php?click_hash={CLICK_HASH}&subscription_id={USER_ID}&goal_slug={GOAL_SLUG}
Goal postbacks require the following fields:
- click_hash - This is the same click_hash generated for a surfer when they go through our tracking links. This field is only required if this is the first postback being sent for the customer (before conversion)
- subscription_id - If this is the first post for the customer, this field will set the customer's ID from your system in NATS For Networks so it can be used for future postbacks instead of click_hash. If this is a follow up post, this will be used to look up the existing customer to insert the Goal transaction in the same customer record.
- goal_slug - This is the "Goal Slug" defined when adding a new Goal. You can look up your existing goal slugs from the Offers Admin -> Manage Goals page. This indicates what type of transaction you are trying to report.
- orderid - This field is only required if this is NOT the first postback being sent for the customer (no click_hash). The Order ID is generally a unique identifier for the transaction from your system. Sending us an identifier for your transactions helps us to ensure that if you accidentally send the same transaction postback multiple times, we will only record it once. It also helps with advertiser communication to find and reference transactions if disputes arise.
You can optionally ask us to enable a setting which will require "orderid" for cases where the goal postback is the first postback for a customer.
Optional Parameters
The following paremeters can also be sent in your postbacks to be recorded with the customer record:
- amount - This parameter is the amount of revenue your network made for the event. If the amount for a transaction doesn't match what's defined as the default amount for the event on the offer, you can send this parameter to set the proper transaction amount to be recorded. This value should be sent in the base currency for your network. The default is USD, but you can check your network's default in the Config Admin -> Currency - All page. This value should also be in decimal format. For example, if a transaction amount is $9.95, the amount should be sent as "&amount=9.95"
- currency - This paremeter defines the currency that the "amount" parameter is sent in. The possible 3 letter currency values are listed on the Config Admin -> Currency - All page. This page is also where you would need to manually maintain conversion rates for your install. When NATS For Networks receives a transaction in a currency that is not your base currency, it will automatically convert the amount to the equivalent amount in your base currency for reporting.
- username
- password
- ip
- firstname
- lastname
- address1
- address2
- zip
- city
- state
- country
- shipping_firstname
- shipping_lastname
- shipping_address1
- shipping_address2
- shipping_zip
- shipping_city
- shipping_state
- shipping_country
- phone
- custom1
- custom2
- custom3
- custom4
- custom5
If you send postbacks with different personal data for the same customer, NATS For Networks will take the latest information sent and update the customer record in question.