NATS For Networks Postback Examples

From TMM Wiki
Jump to navigationJump to search
NATS For Networks
For Affiliates
Automatic SubIDs
Affiliate Stats Dumps
Linkcode
Affiliate Custom Pixels
Affiliate Host and Post
Affiliate Area
Affiliate Account Details
Affiliate Account Change Log
Affiliate Creatives
Affiliate Creatives Search
Affiliate Settings
Affiliate Custom Pixels
Affiliate Linkcodes
Affiliate Linkcode Settings
Affiliate Login History
Affiliate Messages
Affiliate Dashboard
Dashboard Key Statistics
Dashboard Statistics Summary
Affiliate Payment History
Quick Links
Affiliate Referrals Report
Affiliate Referring URL Report
Affiliate Remote Login
Affiliate Signup
Affiliate Statistic Filters
Affiliate Statistic Views
Affiliate SubIDs
NATS For Networks Setup
Creating Admin Accounts
Tracking Domain
Edit Affiliate Text
Edit CSS Colors
Getting Started Admin
Quick Start Guide
Tracking in NATS For Networks
Pixel Builder
Postback Examples
Replacement Variables
Currency Exchange Rates
Admin Dashboard
The Admin Dashboard
Reporting Admin
The Reporting Admin
Track and Strack
  Report Breakdowns
Profit and Loss Report
Subscription Report
Transactions Reports
Affiliate Ratios Report
Affiliate Managers Report
Referral Tier Payouts Report
Referral Signup Payouts Report
Additional Commissions Report
Graphical Affiliate Comparison Report
The Single Day Comparison Report
Actual Affiliate Payments Report
Offers Admin
The Offers Admin
Offers
Offer Setup
Affiliate Referrals
Tracking Domain
Commissions
Commission Changes
Suppression Lists
Pixel Builder
ID Numbers
Offer Partner
Offer/Landing Page Redirection
Setting Rules
Admin Host and Post
Offer Goals
Affiliates Admin
The Affiliates Admin
ID Numbers
Affiliate Managers
Affiliate Referrals
Affiliate Activation
Admin-Only Settings
Affiliate Overrides
Creating Admin Accounts
In-House Accounts
Add Manual Sale
Manual Invoice
Affiliate Documents
Affiliate Enabled Offers
Change Affiliate Status
Account Changes
Advertisers Admin
The Advertisers Admin
Account Changes
Advertiser Invoices
Generate Invoice
Advertiser Approval
Change Advertiser Status
Customers Admin
Customers Admin
Manually Adding a Customer
ID Numbers
Payments Admin
The Payments Admin
Payvia Types
Payout Periods
Payvia Dump Formats
Payment Dump Entry Numbers
Payment Dump Variables
Check Functions
Setting Rules
Payment Methods
Payza
REST API
General
API Overview
GET /service/ping
GET /service/set_currency_exchange_rates
Advertiser
POST /advertiser/add_advertiser
PATCH /advertiser/edit_advertiser
Affiliate
GET /affiliate/get_links
GET /affiliate/get_single_link
GET /affiliate/search
GET /affiliate/decode_trackingcode
PATCH /affiliate/edit_affiliate
POST /affiliate/add_affiliate
POST /affiliate/affiliate_login_ips
Config
GET /config/get_global_void_ips
GET /config/get_global_post_ips
GET /config/get_global_hostnpost_ips
POST /config/add_global_void_ip
POST /config/remove_global_void_ip
POST /config/add_global_post_ip
POST /config/remove_global_post_ip
POST /config/add_global_hostnpost_ip
POST /config/remove_global_hostnpost_ip
Creative
GET /creative/get_creatives
GET /creative/get_creative_fields
GET /creative/get_creative_rules
PATCH /creative/delete_creative
PATCH /creative/edit_creative
PATCH /creative/edit_creative_rules
PATCH /creative/undelete_creative
POST /creative/add_creative
POST /creative/add_creative_rule
POST /creative/delete_creative_rules
Offer
GET /offer/get_conversion_caps
GET /offer/check_orderid_exists
GET /offer/get_commission_changes
GET /offer/get_details
PATCH /offer/activate_offer
PATCH /offer/edit_landing_page
PATCH /offer/edit_offer
PATCH /offer/pause_offer
PATCH /offer/set_commission_change_payouts
PATCH /offer/set_enabled_affiliates
PATCH /offer/set_offer_categories
PATCH /offer/set_offer_countries
PATCH /offer/set_offer_goals
PATCH /offer/set_offer_groups
PATCH /offer/set_offer_marketing_types
PATCH /offer/store_offer_ips
POST /offer/add_commission_change
POST /offer/add_landing_page
POST /offer/add_offer
POST /offer/add_tracking_domain
Reporting
GET /report/profitloss
GET /report/transaction
Customer
PATCH /customer/lock
PATCH /customer/unlock
GET /customer/export
PATCH /customer/forget
Transaction
GET /transaction/transaction_payout_preview
PATCH /transaction/transaction_update_revenue_by_orderid
PATCH /transaction/transaction_update_revenue_by_transaction_hash
POST /transaction/process_void
POST /transaction/process_chargeback
POST /transaction/process_reversal
GET /transaction/click_details
Creatives Admin
The Creatives Admin
Add New Creatives
Add New Creative Type
Tracking Code
Code Builder
Track and Strack
Setting Rules
  Default Creative Types
Creative Types
Image Banners
Flash Banners
Dynamic Text Banners
Feeds
Mailers
Video Download
Video Embed
Page Peels
IM Popups
Footer Ads
Page Ads
Overlays
Communications Admin
The Communications Admin
Add News Item
Sending Messages
Signup Questions
Configuration Admin
The Configuration Admin
Affiliate Signup Postback URL
Edit Affiliate Text
Edit CSS Colors
Misc.
Rules
Freeform Date
Affiliate Custom Signup
Tracking Code
Tracking in NATS For Networks
Void Conversions Remotely

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
  • email
  • 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 - custom value to record with a customer
  • custom2
  • custom3
  • custom4
  • custom5
  • trans_custom1 - custom value to record with a transaction. -1 is a reserved value and should not be used.
  • trans_custom2
  • trans_custom3
  • trans_custom4
  • trans_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.