Track Conversions¶
Abstract¶
Describes the steps you need to follow to track conversions.
Creative instrumentation¶
Step 1. Update the tracker or click URLs to include the relevant macros to pass along the ID to the advertiser tracking systems.
Other macros available are documented at https://developer.yahooinc.com/dsp/docs/macros/macros.html.
Examples:
Click Tracker Description |
Example URL |
---|---|
Generic example |
https://advertiser.clickserver.com?vmcid=${CC}&measurement_partner_required_param_A=${relevant_macro}&measurement_partner_required_param_B=SOME_FIXED_VALUE&……..INSERT OPTIONAL PARAMS……. |
Branch IO |
https://branchster.app.link/EXAMPLE_BRANCH_APP_ID?$3p=a_vm_network&~click_id=${CC}&~secondary_publisher_id=${pubid} |
Step 2. Implement a process or script to collect this ID value and associate it with your conversion data.
Rules setup¶
To ensure that this ad spend is measured by Yahoo’s attribution system, create a conversion rule for your Yahoo DSP line.
Conversion data postback¶
Once the conversion data is available, fire it to Yahoo’s API:
For example:
a) curl --tlsv1.2 -w %{http_code} https://aaca.yahooinc.com/?id=id123\&vmcid=simple_click_id\&dp=simple_dp\&gv=10.0
b) curl --tlsv1.2 -w %{http_code} https://aaca.vahooinc.com/ --data "id=id123&vmcid=${INSERCT_VMCID_COLLECTED_FROM_CLICK}&dp=simple_dp&gv=10.0" --header "Content-Type: application/x-www-form-urlencoded"
Required and supported parameters¶
The required and supported parameters are described in the table below:
URL Parameter Name |
Description |
Required? |
Default |
Example |
---|---|---|---|---|
vmcid |
Value of the pixel context macro collected from the click or the third-party ad server. |
yes |
N/A |
See the integration guide |
id |
Unique event id provided by the partner identified in dp. This is a technical mechanism used by Yahoo to prevent duplication in reporting. |
yes |
N/A |
Should be unique guids. Used to log the event for tracking. |
dp |
The entity responsible for passing the data to Yahoo. |
yes |
N/A |
“branch” |
et |
Business Time of the Event (Epoch UTC milliseconds). |
no |
The receive time of the event is used if parameter is not present. |
1585604630466 |
gv |
The numerical value of any given conversion. By default, the value is assumed to be USD. This will be reported as a dynamic conversion value in DSP and calculated as ROAS in Native. |
no |
None |
12.25 |
gc |
Event Value Currency |
no |
None |
|
ec |
Event Category |
no |
None |
|
ea |
Event Action |
no |
None |
|
.yp |
pixel id |
no |
None |
Maps to a pixel ID - if not provided then reporting will only be on the line/campaign level. |
Other parameters |
no |
N/A |
Not to exceed name length of 32 nor value length of 255. |
API Return Codes¶
Code |
Message |
Reason |
---|---|---|
200 |
Submission processed. |
Valid Request |
400 |
Error. Unsupported Content-Type. |
Invalid Content-Type provided. |
400 |
Error. Unsupported Content-Type for request body. |
Request has body but no Content-Type provided. |
400 |
Error. Missing body and no query parameters provided. |
Missing query parameters and body. |
400 |
Error. Request body/params formatting error. |
Unable to parse request body/params. Failed to decode KVs in request body. Failed to decode KVs in query params. |
400 |
Error. Request does not match specs. |
Key longer than maximum 32 characters. Value longer than maximum 255 characters. Missing required field ‘id’. Missing required field ‘vmcid’. Missing required field ‘dp’. NumberFormatException for keys: et or gv. |
401 |
Error. Invalid ‘Authorization’ HTTP Header. Request a new token. (Not enforced in the initial release). |
Invalid Authorization token. |
500 |
Internal Server Error |
Additional Specs¶
Scenario |
Message/Code |
---|---|
Users either put all of their KVs in the request body or put all of them in the query parameters (not split between them). |
If both are provided, the body is processed only. |
If KVs are provided as ‘query parameters’, Content-Type must be “application/x-www-form-urlencoded” if specified |
Else it will send code 400 (Error. Unsupported Content-Type.) |
If KVs are provided in ‘request body’, Content-Type must be “application/x-www-form-urlencoded” |
Else it will send code 400 (Error. Unsupported Content-Type for request body.) |
Keys and Values must be encoded for both “query parameters” and “request body”. |
Else it will send code 400 (Error. Request does not match specs.) |