What are Subscriber Data Fields?
If you collect user demographic data or external ids (like email), on your web pages, you can leverage these API endpoints to associate that information to the subscriber record.
We will use this data to better select campaigns, tailor creative, and pre-pop forms - for individual subscribers.
This will help maximize our ability to send campaigns that an individual subscriber is most likely to engage with - leading to a higher revenue potential.
More on how we use Subscriber Data
Our AI optimizer will learn correlations between demographic fields and offer engagement. The optimizer can work on unknown/opaque fields and learn if there is predictive power in any of the fields - automatically.
For example, if you pass 'has-fishing-license' => 'true' , our system will learn if that data point predicts engagement on certain campaigns vs others.
Publisher data fields will not be used to optimize campaign selection for other publishers. It will be used to improve your campaign selection only.
Requirements
- Ability to generate a session_id and make it available on pages where the push subscription is registered. A session_id is a unique string that can be up to 100 characters. You can make it available on pages by query string or you can generate it into our page script
- Ability to make a GET request containing the session_id and data points.
Implementation Steps
Step 1: Setting session_id on the push subscription
There are two ways that you can set your session_id on the push subscription, choose the option that best fits your situation or capabilities:
Query String (option #1):
On pages where you collect the push subscription, use the following key in the query string: session_id=
For example:
https://your-domain.com/?session_id=VALUE
Generate into our JavaScript (option #2):
The standard page script, which calls our push functions, should already be on your pages. It looks like this:
<script> (function(document, window) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://trk-syntrex.com/scripts/push/script/[YOUR-PARTNER-ID]?url=" + encodeURI(self.location.hostname);
script.onload = function() {
push_init();
push_subscribe();
};
document.getElementsByTagName("head")[0].appendChild(script);
})(document, window); </script>
You will be adding the following:
var sessionId = ''; // set your id here
setSessionId(sessionId);
The result should look like this:
<script > (function(document, window) {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://trk-syntrex.com/scripts/push/script/[YOUR-PARTNER-ID]?url=" + encodeURI(self.location.hostname);
script.onload = function() {
push_init();
var sessionId = ''; // set your id here
setSessionId(sessionId);
push_subscribe();
};
document.getElementsByTagName("head")[0].appendChild(script);
})(document, window); </script>
Step 2: Configuring the API endpoint
Now that you are setting a session_id on push subscriptions, you can configure the HTTP request(s) to associate subscriber data to them.
- Keys should be lowercase and kebab-case. 100 Character limit.
- Values can be in any format. 100 Character limit.
(Demographic Data values need to be standardized across subscribers)
Demographic Data Endpoint
We encourage you to send us any data points that you have and let our technology decide if they are useful predictors.
IMPORTANT: If you are passing any of the below data types please use the standardized keys as defined:
| Standardized Keys | Example Value |
| johndoe@example.com | |
| email_md5 | fd876f8cd6a58277fc664d47ea10ad19 |
| first_name | John |
| last_name | Doe |
| gender | Male |
| zip | 16053 |
| age | 36 |
| marital_status | Married |
| education | College Degree |
Use the following endpoint (GET method):
https://subscriber-data.smpush.com/ads-api/subscriber-data/{api_key}?session_id={session_id}&client_id={client_id}&key=KEY&value=VALUE
Responses
valid response (200 OK)
{
"success" : "true",
"message" : "success"
}general error
{
"success" : "false",
"message" : "unable to set record"
}unknown session id
{
"success" : "false",
"message" : "unknown session_id"
}Demographic Data Error: key/value longer than 100 characters
{
"success" : "false",
"message" : "key / value / session_id exceeding max length"
}External ID Data Error: External type id / External id is longer than 100 characters
{
"success" : "false",
"message" : "External type id /External id / session_id exceeding max length"
}External ID Data Error: unknown External type id / External id
{
"success" : "false",
"message" : "unknown External type id /External id"
}