Narrativ API Developer Documentation¶
At Narrativ, we transform real content into organic ads that are not impacted by AdBlock. Our goal is to lift publisher revenues from organic content through real-time bidding and machine learning solutions. The Narrativ API allows you to access our technology without having editors create manual links. Create an API key to get started or browse the full documentation below:
API Authentication¶
Creating an API key¶
To use the Narrativ API, you will need to create an API key for your user account. Navigate to the Developer Options page and follow the directions there.
Using your API key¶
Unless otherwise indicated, Narrativ API requests must include a valid
API key. Send your API key in the HTTP Authorization
header, prefixed
with the scheme NRTV-API-KEY
.
For example:
curl -i -H 'Authorization: NRTV-API-KEY Sy8xLzE2MTE3MDIxNzY3NDM0OTc0MDcv' \
https://api.narrativ.com/api/v1/tokeninfo/
HTTP/1.1 200 OK
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"token_id": 1001,
"uid": 2,
"description": "My API Key",
"datetime_created": "2017-07-25T20:58:38Z",
"datetime_updated": "2017-07-25T20:58:38Z",
"datetime_active": "2017-07-25T20:58:38Z",
"datetime_expires": null,
"datetime_last_used": null,
"is_enabled_by_user": true
}
]
}
If a valid API key is not sent, the server will return an HTTP 401 error:
curl -i -H 'Authorization: NRTV-API-KEY TestInvalidAPIKey' \
https://api.narrativ.com/api/v1/tokeninfo/
HTTP/1.1 401 UNAUTHORIZED
{
"info": {
"error": true,
"status": 401
},
"data": [],
"error": {
"code": 4302,
"message": "Invalid API token",
"data": null
}
}
Keeping your account secure¶
Remember to keep your API key secret, since anyone who has it can use it to access your Narrativ account. If you ever lose your API key, you can visit the Developer Options page to disable it and create a new one.
Sending and Receiving Data¶
Data formats¶
The API is accessed via HTTPS at https://api.narrativ.com/ . Use JSON when
sending data to API endpoints that require it. Remember to specify
Content-Type: application/json
in the request headers.
When sending URLs, make sure to use the complete link, including the
http://
or https://
part.
Timestamps are formatted according to the ISO 8601 standard, using the
UTC time zone, and are precise to the nearest second. For example,
2017-07-26T19:48:25Z
.
Response fields¶
API responses will always contain a few standard fields:
info: An object containing general information about the request/response:
error:
true
if something went wrong with the API request, orfalse
if everything is okay.status: The HTTP status code, repeated here for convenience.
data: A list of resources returned by the request.
error: If an error occurred, this object will contain detailed information about the problem.
code: A number categorizing the error.
message: A string describing the specific error.
SmartLinks¶
Create a new SmartLink¶
Request¶
POST /api/v1/smart_links/
Field Name |
Type |
Description |
---|---|---|
url |
string |
The URL of the product page for this SmartLink. |
article_name |
string |
The name of the article that this SmartLink will be featured on. |
article_url |
string |
The URL of the article that this SmartLink will be featured on. |
article_publication_date |
timestamp |
The date/time when the article is expected to be published. |
exclusive_match_requested |
boolean |
Optional. If true, lock this SmartLink to the original merchant. Default false. |
pub_id |
integer |
Publisher ID. Required if you have multiple publisher accounts. |
Response¶
Field Name |
Type |
Description |
---|---|---|
auction_id |
string |
A long unique identifier for the SmartLink that was created. |
smart_link_id |
integer |
A unique identifier for the SmartLink that was created. |
smart_link_url |
string |
The URL of the SmartLink, which should be substituted for the original link in your article. |
Example¶
curl -i -H 'Authorization: NRTV-API-KEY Sy8xLzE2MTE3MDIxNzY3NDM0OTc0MDcv' \
-H 'Content-Type: application/json' \
-d '{"url": "https://www.google.com/",
"article_name": "Top Ten Search Engines",
"article_url": "http://www.my-blog.example",
"article_publication_date": "2017-08-02T17:00:00Z",
"exclusive_match_requested": true,
"pub_id": 1}' \
https://api.narrativ.com/api/v1/smart_links/
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"info": {
"error": false,
"status": 201,
},
"data": [
{
"smart_link_id": 2554,
"auction_id": "1611792246540568252",
"uid_created": 2,
"datetime_created": "2017-07-26T19:48:25Z",
"pub_id": 1,
"url": "https://www.google.com/",
"exclusive_match_requested": true,
"smart_link_url": "https://shop-links.co/1611792246540568252",
"article": {
"article_id": 2536,
"uid": 2,
"pub_id": 1,
"url": "http://www.my-blog.example",
"publication_date": "2017-08-02T17:00:00Z",
"datetime_created": "2017-07-26T19:48:25Z",
"datetime_updated": "2017-07-26T19:48:25Z",
"name": "Top Ten Search Engines"
}
}
]
}
ClickMate¶
Overview¶
ClickMate provides a wrapper that you can use on any link to convert it, on the fly, to a SmartLink. This means that the link will go through our matching process, and on future clicks will work through our real time auction system and will re-route to the most beneficial advertiser.
Your account must be a member of our LinkMate program to use this feature. For more information about this program, feel free to contact us.
Build a ClickMate Link¶
If you wanted to monetize a link to https://dermstore.com.example/shop/product1234 you would put that link in your HTML, or use our Chrome Extension to turn it into a SmartLink. ClickMate gives you another option. You would wrap the link in the form:
https://shop-links.co/link/?url=https%3A%2F%2Fdermstore.com.example%2Fshop%2Fproduct1234&publisher_slug=myacct&article_name=my-story
The first time someone clicks that link, our system will create a SmartLink in your account if dermstore.com.example is one of the domains we handle for you. On subsequent clicks, if the link is matched and an auction takes place, the destination will be redirected. If there is no auction, the link will just be redirected to the original URL.
The ideal usage for this is to set up a programmatic integration–either wrap all commerce links on your site or all of the ones you want Narrativ to monetize. Our system will make sure that your readers get to the appropriate destination while finding you all the best monetezation opportunities. If the wrapping happens server side by your CMS, this will even work in no-javascript or ad-blocked environments like AMP.
Query Params¶
URL Path Parameter |
Type |
Description |
---|---|---|
url |
string(2048) |
The URL of the target link (must be URL encoded!) Required without this, users will see an error page |
article_url |
string(2048) |
The URL of the article your link is coming from (must be URL encoded!). Optional |
article_name |
string(100) |
The name or title of the article your link is coming from. Optional We require either this or aritcle_url (or both) to correctly group and monetize links |
publisher_slug |
string(64) |
The slug provided by your Narrativ account rep. Required Without this we will not know what account to monetize clicks for |
exclusive |
Integer |
set this to 1 if you want to ensure that this particular link only goes to the original advertiser Optional |
u1 |
string(2048) |
arbitrary tracking parameter that you may apply to links for your own tracking, will be passed to our stats Optional |
URL Encoding¶
All parameters must be URL encoded. See URL Encoder.
Example Code¶
In Javascript:
var url = 'https://merchant.example/product1234';
var slug = 'myacct';
var articleName = document.title;
var articleUrl = window.location.href;
var clickmateUrl = 'https://shop-links.co/link?url=' + encodeURIComponent(url) +
'&publisher_slug=' + slug +
'&article_name=' + encodeURIComponent(articleName) +
'&article_url=' + encodeURIComponent(articleUrl);
Product API¶
Overview¶
By providing us a payload with certain product descriptors, we will return a set of monetizable ClickMate links, along with our point-in-time estimate of the CPC for each product in the result set.
Your account must be a member of our LinkMate program to use this feature. For more information about this program, feel free to contact us.
Request¶
GET /api/v1/product_match/clickmate/exclusive_links/
Query Param |
Type |
Description |
---|---|---|
publisher_slug |
string(64) |
(Required) The slug provided by your Narrativ account rep. |
gtin |
string(14) |
Product descriptor (Optional): the GTIN of the product to be wrapped in a ClickMate link |
sku |
string(255) |
Product descriptor (Optional): the SKU of the product to be wrapped in a ClickMate link |
product_url |
string(2048) |
Product descriptor (Optional): the URL of the product to be wrapped in a ClickMate link (must be URL encoded!) |
article_url |
string(2048) |
Article info (Optional): The URL of the article your link is coming from (must be URL encoded!) |
article_name |
string(100) |
Article info (Optional): The name or title of the article your link is coming from |
Required Parameters¶
Option 1: Provide at least one product descriptor in your request (
gtin
,sku
,product_url
) and at least one article_info (article_url
,article_name
)Option 2: Provide at least one product descriptor in your request (
gtin
,sku
,product_url
) and zero article_info (article_url
,article_name
). In this case, you will need to append at least one article_info (article_url
,article_name
) as query parameters to the resulting ClickMate link. See the ClickMate documentation for more information.
Response¶
The response data consists of the list data
, with each entry
having the following structure:
Field Name |
Type |
Description |
---|---|---|
best_effort_cpc |
float |
Point in time prediction of the CPC for the merchant publisher pairing in USD |
clickmate_link |
string |
The ClickMate URL which monetizes the retrieved product |
product_information |
json |
|
URL Encoding¶
All parameters must be URL encoded. See URL Encoder.
Example Requests¶
GET /api/v1/product_match/clickmate/exclusive_links/?publisher_slug=myacct>in=77777777777
GET /api/v1/product_match/clickmate/exclusive_links/?publisher_slug=myacct&sku=00000000&>in=88888888888888
GET /api/v1/product_match/clickmate/exclusive_links/?publisher_slug=myacct&sku=00000000&>in=99999999999999&product_url=https%3A%2F%2Fwww.merchant.example%2Fproduct%2F123%0A
Example Response¶
{
"data": [
{
"product_information": {
"price": "15.99",
"product_name": "Example Product",
"in_stock": true,
"gtin": "55555555555555",
"image_url": "https://merchant.example/path/to/image_url",
"brand": "Example Brand",
"merchant_name": "Example Retailer"
},
"clickmate_link": "https://shop-links.co/link/?url=https%3A%2F%2Fwww.merchant.example%2Fproduct%2F123%0Aexclusive=1&publisher_slug=myacct",
"best_effort_cpc": 0.50,
}
]
}
LinkMate¶
Usage¶
Use the LinkMate API to retrieve the SmartLinks for a set of URLs, automatically creating new SmartLinks that do not already exist. LinkMate eliminates the need to create SmartLinks up front via the Chrome Extension, making it easier for large publications to get started on the Narrativ platform.
Your account must be a member of our LinkMate program to use this feature. For more information about this program, feel free to contact us.
Note
The LinkMate API does not require client authentication, but may be subject to rate-limiting if called an extreme number of times from the same origin. If you are developing a server application, consider using the SmartLinks API instead.
Create and Retrieve Links¶
Request¶
POST /api/v1/publishers/<pub_id>/linkmate/smart_links/
URL Path Parameter |
Type |
Description |
---|---|---|
pub_id |
integer |
Your publisher ID. |
Request payload¶
Field Name |
Type |
Description |
---|---|---|
article |
object |
Information about the page/article which contains your links. |
links |
list[object] |
Data for each link you are submitting. |
unwrap_links |
boolean |
(Optional) If this is set to True or ommitted, we will check inside click trackers or deeplinks for domains to rewrite |
Article information¶
Field Name |
Type |
Description |
---|---|---|
name |
string(100) |
The name of the page/article which contains your links. |
url |
string(2048) |
The URL of the page/article which contains your links. |
Links¶
Field Name |
Type |
Description |
---|---|---|
raw_url |
string |
The URL being submitted for SmartLink creation/retrieval. |
exclusive_match_requested |
boolean |
Optional. If true, lock this SmartLink to the original merchant. Default false. |
Response¶
For each original URL you submit, the following actions occur:
If the URL has never been submitted before with the specified article, a new SmartLink is created for the URL and assigned to the article.
If the URL-article combination has already been submitted before, the existing SmartLink is retrieved.
If a SmartLink is not yet available for the URL, or the URL is not valid for SmartLink creation, nothing happens. (It is still possible for SmartLink data to become available on subsequent API calls, since link creation takes place asynchronously.)
The response data consists of the list smart_links
, with each entry
having the following structure:
Field Name |
Type |
Description |
---|---|---|
auction_id |
string |
A long unique identifier for the SmartLink that was created, for use with the Auction API. |
smart_link_id |
integer |
A unique identifier for the SmartLink that was created. |
url |
string |
The original URL that was submitted for SmartLink creation. |
Example¶
Submitting a collection of three URLs:
POST /api/v1/publishers/2143/linkmate/smart_links/
{
"article": {
"name": "Top Search Engines",
"url": "https://my-blog.com.example/top-search-engines.html"
},
"links": [
{
"raw_url": "https://www.google.com/",
"exclusive_match_requested": true
},
{
"raw_url": "https://www.bing.com/",
"exclusive_match_requested": true
},
{
"raw_url": "https://www.yahoo.com/",
"exclusive_match_requested": true
}
]
}
If SmartLinks are available for the first two URLs, but not the last one, the response might look like the following:
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"smart_links": [
{
"smart_link_id": 211925,
"auction_id": "1629787850745092913",
"uid_created": null,
"datetime_created": "2018-02-05T19:16:57Z",
"datetime_updated": "2018-02-05T19:16:57Z",
"pub_id": 2143,
"url": "https://www.google.com/",
"exclusive_match_requested": true
},
{
"smart_link_id": 211926,
"auction_id": "1629787851069847260",
"uid_created": null,
"datetime_created": "2018-02-05T19:16:57Z",
"datetime_updated": "2018-02-05T19:16:57Z",
"pub_id": 2143,
"url": "https://www.bing.com/",
"exclusive_match_requested": true
}
]
}
]
}
Auctions¶
Usage¶
The Auction API runs an auction on a SmartLink and returns an updated destination URL for the link. You can use this API to write your own custom publisher Javascript tags. Be sure to read through the tutorial before proceeding.
Note
The Auction API does not require client authentication, but may be subject to rate-limiting if called an extreme number of times from the same origin.
Run Auction¶
Request¶
GET /api/v1/auction/
Query Param |
Type |
Description |
---|---|---|
a |
string |
Auction ID. This is the number at the end of your SmartLink.
For example, the SmartLink |
t |
integer |
Cache-busting parameter. Set this to a randomly-generated number to prevent HTTP caching of the auction request and response. |
uuid |
string |
Page Session UUID. The UUID v4 value that your client has generated for the current page session. |
Response¶
Auction result data¶
Field Name |
Type |
Description |
---|---|---|
auction_result . id |
string |
A unique identifier for the result of the auction. |
auction_result . product |
object |
Product information for the advertiser that won the auction. |
auction_result . redirect_url |
string |
The new destination URL for the SmartLink. |
auction_result . tracker_urls |
object |
Third-party event tracker URLs for this SmartLink placement. Your client is responsible for firing all trackers listed here when the applicable event(s) occur. |
impression_pixel_url |
string |
The primary impression event tracker URL for this SmartLink placement. Your client is responsible for firing this tracker after receiving the auction response. |
Product information (auction_result.product)¶
Auction API responses may provide the following information about the advertiser (retailer/merchant) and the product page that will be receiving the click on the rewritten SmartLink:
Field Name |
Type |
Description |
---|---|---|
id |
integer |
A unique identifier for the product that the destination URL refers to. |
name |
string |
The name of the product being sold. |
price |
string |
The price of the product being sold, in USD. |
url |
string |
The raw URL of the product page, for display purposes. (Do not rewrite the SmartLink with this URL.) |
image_url |
string |
The image URL of the product being sold, for display purposes. |
is_in_stock |
boolean |
The stock status of the product being sold. |
merchant . id |
integer |
A unique identifier for the advertiser. |
merchant . canonical_host |
string |
The host part of the advertiser’s website URL, for display purposes. |
merchant . name |
string |
The name of the advertiser. |
merchant . url |
string |
The full URL for the advertiser’s home page. |
Third-party event trackers (auction_result.tracker_urls)¶
Auction API responses may include the following set of third-party event trackers that apply to your SmartLink placement:
Event Tracker Type |
Event Description |
---|---|
impression |
Signals that at least one occurrence of this SmartLink has been loaded on the page. You may fire this event tracker immediately after receiving the auction response. |
viewable_impression |
Fire this event tracker once any occurrence of this SmartLink is scrolled into view on the page. |
Tracker URLs may include the template parameter {RAND}
, which must be
replaced with a randomly-generated number for cache-busting prior to firing
the tracker.
Do NOT fire a third-party event tracker more than once per page for the same event, even if the same SmartLink appears multiple times on that page.
Example¶
GET https://api.bam-x.com/api/v1/auction/
?a=1629223267830557131
&t=1517261651
&uuid=8132ac19-109a-466e-8037-540a9bd12798
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"auction_result": {
"id": "1629224701990881693",
"auction_id": "1629223267830557131",
"redirect_url": "https://api.bam-x.com/api/v1/redirect/?a=1629223267830557131&uid_bam=1629224701957143181&ar=1629224701990881693&url=https%3A%2F%2Fwww.amazon.com.example%2F&uuid=8132ac19-109a-466e-8037-540a9bd12798",
"product": {
"merchant": {
"url": "https://www.amazon.com/",
"canonical_host": "amazon.com",
"id": 2186,
"name": "Amazon"
},
"bamx_product_category_id": 3,
"name": "Designer Handbag",
"url": "https://www.amazon.com.example/product/1234",
"image_url": "https://www.static.amazon.example/image/path/1234",
"is_in_stock": true,
"price": "299.99",
"id": 8030310
},
"tracker_urls": {
"viewable_impression": [
"https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;kw=lv;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?",
"https://ad.atdmt.com.example/1111?r={RAND}"
],
"impression": [
"https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;kw=li;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?",
"https://ad.atdmt.com.example/2222?r={RAND}"
]
}
},
"impression_pixel_url": "https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?"
}
]
}
AMP¶
Narrativ’s smartlink technology can be deployed to Google AMP pages. To enable Smartlinks on your AMP page, please notify Narrativ and then integrate the amp-smartlinks
tag into your AMP pages, as described below.
Usage¶
In addition to the docs below, you may reference the information provided on AMP’s Github page.
AMP Smartlinks searches the AMP article for Smartlink-compatible URLs, automatically creating new SmartLinks that do not already exist. AMP Smartlinks is our full Linkmate offering in AMP.
Your account must be a member of our LinkMate program to use this feature. For more information about this program, feel free to contact us
Make sure to replace “ACCOUNT NAME” with your Narrativ account name. If you don’t know your account name, please reach out to your account manager or contact us.
<!doctype html>
<html ⚡>
<head>
...
<meta name="amp-link-rewriter-priorities" content="amp-smartlinks amp-other-affiliate">
<script async custom-element="amp-smartlinks" src="https://cdn.ampproject.org/v0/amp-smartlinks-0.1.js"></script>
...
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
...
<amp-smartlinks
layout="nodisplay"
nrtv-account-name="ACCOUNT NAME"
linkmate>
</amp-smartlinks>
...
</body>
</html>
AMP Attribute values¶
Attribute Name |
Type |
Required |
Description |
---|---|---|---|
nrtv-account-name |
string |
True |
Your Narrativ account name. |
linkmate |
Boolean |
False |
The presence of this attribute determines if Linkmate is true or not. |
exclusive-links |
Boolean |
False |
The presence of this attribute determines if |
link-attribute |
string |
False |
Where you store the outbound link value, if it is not in |
link-selector |
string |
False |
CSS selector for selecting links from the page. Default value is |
To make all LinkMate links on the page exclusive, you can use the
exclusiveLinks
flag in theamp-smartlinks
element. Exclusive links means that links will only be matched to the original merchant.
<amp-smartlinks layout="nodisplay" nrtv-account-name="ACCOUNT NAME" linkmate exclusive-links> </amp-smartlinks>
If you are running
amp-smartlinks
with other affiliate tags then you have to specify the following element with the ordering you want your links to be monetized.
... <meta name="amp-link-rewriter-priorities" content="amp-smartlinks amp-other-affiliate"> ... </head> <body> ... <amp-smartlinks layout="nodisplay" nrtv-account-name="ACCOUNT NAME" linkmate> </amp-smartlinks>
If you do not use
href
attributes to specify the outbound links, then make sure to specifylink-attribute
in the element. Also, if you want to limit the selector used to detect links uselink-selector
.
<amp-smartlinks layout="nodisplay" nrtv-account-name="ACCOUNT NAME" linkmate link-attribute="data-vars-outbound-link" link-selector="a.links-to-be-monetized"> </amp-smartlinks>
To disable LinkMate on a specific link, add
#donotlink
to the end of the URL
http://exampleproductlink.example/supercoolproduct/ref=ods?#donotlink
To indicate an exclusive link, add
#locklink
to the end of the URL
http://exampleproductlink.example/supercoolproduct/ref=ods?#locklink
Publisher Events¶
Note
The Events API does not require client authentication, but may be subject to rate-limiting if called an extreme number of times from the same origin.
Submit New Publisher Events¶
Request¶
POST /api/v1/events/<event_category>/<event_type>/
Available event categories and types¶
Event Category |
Event Type |
Description |
---|---|---|
impressions |
page_impression |
Marks the beginning of a page session. Fire this event once your page has loaded and you have generated your Page Session UUID. |
impressions |
bam_link_impression |
Signals that a SmartLink (Bam Link) has loaded on the page. |
Event request payload¶
Field Name |
Type |
Description |
---|---|---|
organization_type |
string |
This field must always be set to |
organization_id |
integer |
Your publisher ID. |
user |
object |
Information about the current visitor to your site, for analytics. |
events |
list[object] |
Data for each event that you are submitting. You may submit up to 100 events per API call. |
User information fields¶
You must generate and assign a Page Session UUID to your events. The other fields listed here provide context about your site visitor and your article for deeper analytics.
Field Name |
Type |
Description |
---|---|---|
page_session_uuid |
string |
The UUID v4 value that your client has generated for the current page session. |
source_url |
string |
The URL of the current page. |
previous_url |
string |
Optional. The HTTP Referer URL. |
Event data for page impressions¶
Page events currently require no additional data. In the events
list,
send an empty object {}
.
Event data for SmartLink (Bam Link) impressions¶
In the events
list, send an object containing the following data for
each SmartLink:
Field Name |
Type |
Description |
---|---|---|
auction_id |
string |
The Auction ID of the SmartLink. |
Response¶
Empty response. An HTTP 201 status code indicates successful event submission.
Examples¶
Submitting a single page impression event:
POST /api/v1/events/impressions/page_impression/
{
"organization_type": "publisher",
"organization_id": 1,
"user": {
"page_session_uuid": "8132ac19-109a-466e-8037-540a9bd12798"
},
"events": [
{}
]
}
HTTP/1.1 201 CREATED
Content-Length: 0
Submitting a group of two SmartLink impression events using a single request:
POST /api/v1/events/impressions/bam_link_impression/
{
"organization_type": "publisher",
"organization_id": 1,
"user": {
"page_session_uuid": "8132ac19-109a-466e-8037-540a9bd12798"
},
"events": [
{
"auction_id": "1522995078114976993"
},
{
"auction_id": "1522738266273264784"
}
]
}
HTTP/1.1 201 CREATED
Content-Length: 0
Statistics¶
Fetches statistics for a given publisher over a specified date range.
Get statistics grouped by articles and merchant per day¶
Request¶
GET /api/v1/publishers/<pub_id>/stats_by_article_merchant_daily/
URL Path Parameter |
Type |
Description |
---|---|---|
pub_id |
integer |
Your publisher ID. |
Query Param |
Type |
Description |
---|---|---|
date_from |
string |
Required: The starting date to collect statistics, as an ISO 8601 compliant string. Ex: ‘2018-01-01’, ‘2015-03-11’ |
date_to |
string |
Required: The end date to collect statistics, as an ISO 8601 compliant string. Must be greater than |
limit |
integer |
Optional: The upper limit on the number of rows returned by this query. The current default and maximum is |
order_by |
string |
Optional: Order the returned rows by the specified column. Current default is
|
out_of_network |
boolean |
Optional: If set to true, return data for other networks in addition to the Narrativ network. Default value is false. |
Response¶
The response data consists of the list stats
, with each entry
having the following structure:
Field Name |
Type |
Description |
---|---|---|
advertiser_name |
string |
The full name of the advertiser. Will default to |
article_name |
string |
The full name of the article. |
advertiser_attributed_sales |
integer |
The total number of sales attributed to the advertiser. |
pub_earnings |
string |
The amount of money earned by the publisher in USD. (Ex: ‘12345.67’) |
article_id |
integer |
The ID of the particular article. |
merch_id |
integer |
The ID of the merchant. |
impressions |
integer |
The total number of page impressions. |
advertiser_attributed_revenue |
string |
The total amount of revenue attributed to the advertiser in USD. (Ex: ‘100.00’) |
pub_id |
integer |
The ID of the publisher. |
event_date |
string |
The date assoicated with this entry. |
clicks |
integer |
The total number of clicks. |
Examples¶
Get statistics grouped by articles and merchants per day between 2018-03-11 and 2018-03-12:
GET /api/v1/publishers/1/stats_by_article_merchant_daily/
{
"date": {
"date_from": "2018-03-11 00:00:00",
"date_to": "2018-03-12 00:00:00"
},
"pub_id": 1,
"stats": [
{
"advertiser_name": "Merchant Name A",
"article_name": "Some article name",
"advertiser_attributed_sales": 60,
"pub_earnings": "10.25",
"article_id": 1,
"merch_id": 10,
"impressions": 200,
"advertiser_attributed_revenue": "150.00",
"pub_id": 1000,
"event_date": "2018-03-11",
"clicks": 500
},
{
"advertiser_name": "Merchant Name A",
"article_name": "Another article name",
"advertiser_attributed_sales": 600,
"pub_earnings": "99.75",
"article_id": 1,
"merch_id": 10,
"impressions": 700,
"advertiser_attributed_revenue": "350.00",
"pub_id": 1000,
"event_date": "2018-03-12",
"clicks": 200
}
]
}
Javascript Tag Basics¶
The Narrativ platform collects data on Publisher and Advertiser websites to allow the system to make intelligent decisions that optimize SmartLink auctions. By analyzing content that readers are viewing and clicking, and taking their purchase history into account, Narrativ ensures that consumers are matched with merchants who carry the products they want.
Narrativ Publisher Tag¶
Functionality¶
The Narrativ publisher tag does two main things. First, it will find any SmartLinks on the page and run the auctions, allowing the destination of the links to be updated ahead of time. Second, it will track user behavior such as SmartLink impressions and clicks.
Implementation¶
Getting the publisher tag to run successfully is a simple process. Copy and paste the following Javascript snippet in the HEAD section of all your site’s pages.
Make sure to replace “ACCOUNT NAME” with your Narrativ account name.
Need to know your Narrativ account name? Log into dashboard.narrativ.com and go to setup to see the snippet customized with your account info, or reach out to your account manager for support as needed.
See if it’s working: There is a checker on your “setup” page where you can insert your site URL to verify if the Narrativ Publisher tag is correctly installed.
<script type="text/javascript">
(function(window, document, account) {
window.skimlinks_exclude = ["shop-links.co", "shop-edits.co"];
var b = document.createElement("script");
b.type = "text/javascript";
b.src = "//static.narrativ.com/tags/" + account + ".js";
b.async = true;
var a = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(b,a);
})(window, document, "ACCOUNT NAME");
</script>
Usage¶
If your publisher account is a member of our LinkMate program, you can enable the LinkMate feature for your Javascript tag. The tag will automatically scan your article and convert any regular links to SmartLinks.
Toggle LinkMate¶
To enable or disable LinkMate globally for your publisher account, contact us at hello@narrativ.com
Once LinkMate is enabled on your publisher account, you can toggle LinkMate on or off across your entire site by updating the Narrativ window object
window.NRTV_EVENT_DATA.linkmate = true;
Once LinkMate is enabled on your publisher account, you can toggle LinkMate on and off on a specific article by updating the Narrativ window object
window.NRTV_EVENT_DATA.donotlink = true;
To make all LinkMate links on the page exclusive, you can use the
exclusiveLinks
flag on the Narrativ window object.window.NRTV_EVENT_DATA.exclusiveLinks = true;
To disable LinkMate on a specific link, add
#donotlink
to the end of the URL:http://amazon.com.example/BF93JSD34/ref=ods?#donotlink
To indicate an exclusive link, add
#locklink
to the end of the URL:http://amazon.com.example/BF93JSD34/ref=ods?#locklink
Updating Article Content with Auction Results¶
As discussed above, one main benefit of the Narrativ JsTag is to find commerce links on your site and run their auctions on page load. For publishers whose commerce buttons or article content mention the merchant’s name and product price (“$5 at Nordstrom”), this feature will enable you to update those values dynamically.
After an auction completes, the Narrativ tag will write the output of the auction to the data-bamx-auction attribute. In that attribute, you can find product price, retailer name, image_url, etc. to update the article information for a link. A full list of the auction response can be found on our Auction page.
Updating Your Buttons¶
Below is an example JS snippet that will create a MutationObserver, on all relevant links on your article, which trigger after our auction runs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | const anchorNodes = [...document.querySelectorAll('a.monetized-links')];
const config = {attributes: true};
for (let i = 0; i < anchorNodes.length; i++) {
let anchor = anchorNodes[i];
const logFunction = (mutationList, observer) => {
for (let j = 0; j < mutationList.length; j++) {
const mutation = mutationList[j];
if (mutation.type === 'attributes' && mutation.attributeName === 'data-bamx-auction') {
console.log('Narrativ Auction has finished. Update display values now');
console.log(anchor.getAttribute('data-bamx-auction'));
// Your custom update function here.
}
}
};
const observer = new MutationObserver(logFunction);
observer.observe(anchor, config);
}
|
Narrativ Advertiser Tag¶
Functionality¶
The Narrativ advertiser tag allows Narrativ to track user behavior on an advertiser’s site. Our auction system optimizes advertiser acquisition and ROI by analyzing data on page views and purchase behavior. No Personal Identifying Information (PII) is captured. The tag runs asynchronously in the background so there is no impact to page load times.
Implementation¶
We track two types of events for our partners - check outs and page views:
Place the check out tag on the page that loads after your customer has finished shopping and paid for their purchase (your site’s equivalent of a “Thank you for your order” page).
Place the page view tag on every other page that loads during your user’s journey, so that we can empower you with data on what products they are looking at before they check out. Important! Replace “ACCOUNT NAME” with your Narrativ account name in all snippets. Reach out to hello@narrativ.com for help with your Narrativ account name as needed.
Adding Information About Your Checkout Page¶
For checkout events, you have to fill in some information about the checkout before loading our Javascript. This is done by inserting the relevant data into a variable called window.BAMX_EVENT_DATA. If a field is optional, you can just leave it out if you choose not to include the data.
window.BAMX_EVENT_DATA
Field Name |
Type |
Description |
---|---|---|
page_type |
string |
Required. Must be “checkout” to tell the tag to fire a checkout event. |
user_id |
string |
Optional. The ID the user has in your system, if available. |
order_id |
string |
Required. The unique order_id for the checkout that just completed. |
order_value |
float |
Required. The total purchase price of the order. |
currency |
string |
Required. The three digit code for the currency that order_value is in (ex: ‘USD’). Uses ISO 4217 |
products_purchased |
array |
Required. An array of Product objects representing the purchased items, as defined below. |
Product
Field Name |
Type |
Description |
---|---|---|
product_id |
string |
Required. The unique identifier for this product. |
product_name |
string |
Required. The name of the product. |
product_price |
float |
Required. The price of the product. |
product_quantity |
integer |
Required. The number of this product purchased in this order. |
product_category |
string |
Optional. The Google category of the product. |
product_brand |
string |
Optional. The brand of the product. |
product_image |
string |
Optional. The URL of the product image. |
Full Example
What you see below is just an example. You cannot copy and paste it as is. Insert the check out information from your own page into our data layer using Javascript before loading the Narrativ tag. Remember to replace “accountname” with your Narrativ account name.
<!-- Begin Narrativ Jstag -->
<script type="text/javascript">
var purchased = window.dataLayer[3]['OrderItems'];
var productsPurchased = [];
var orderTotal = 0;
for (var i = 0; i < purchased.length; i++) {
productsPurchased.push({
product_id: purchased[i].ItemID,
product_name: purchased[i].ItemName,
product_category: purchased[i].ItemCategory,
product_brand: purchased[i].ItemBrand,
product_image: purchased[i].ItemImageUrl,
product_price: purchased[i].ItemPrice,
product_quantity: purchased[i].ItemQuantity,
});
orderTotal += product_price;
}
window.BAMX_EVENT_DATA = {
page_type: 'checkout',
user_id: {{UserID}},
is_new_visitor: {{RegisteredCustomer}},
products_purchased: productsPurchased,
order_id: {{OrderID}},
order_value: orderTotal,
currency: {{CurrencyCode}},
};
(function(account) {
try {
var b = document.createElement("script");
b.type = "text/javascript";
b.src = "//static.narrativ.com/tags/" + account + ".js";
b.async = true;
var a = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(b, a);
} catch (e) {}
}("accountname"));
</script>
<!-- End Narrativ Jstag -->
Adding Information for the Page View Tag¶
The page view tag goes on every page except for pages with PII. Remember to change “ACCOUNT NAME” to your Narrativ account name.
What you see below is another example. You cannot copy and paste it as is. Insert the page view information into our data layer using Javascript before loading the Narrativ tag.
<!-- Begin Narrativ Jstag -->
<script type="text/javascript">
(function(account) {
try {
var b = document.createElement("script");
b.type = "text/javascript";
b.src = "//static.narrativ.com/tags/" + account + ".js";
b.async = true;
var a = document.getElementsByTagName("script")[0];
a.parentNode.insertBefore(b, a);
} catch (e) {}
}("ACCOUNT NAME"));
</script>
<!-- End Narrativ Jstag -->
Google Tag Manager Walkthrough¶
Below is a walkthrough for implementing the Narrativ pixel using a “Custom HTML” tag in Google Tag Manager. Start by navigating to your Google Tag Manager Dashboard.
Select “Tag Configuration” to begin making a new pixel.

Select “Custom HTML” to open a text field to copy and paste the above code. Make sure you replace “ACCOUNT NAME” with your Narrativ account name.

Enter the code from the “Page View Tag” snippet (See the section before this). Replace the content of “BAMX_EVENT_DATA” with the relevant data from your data layer.

Select “All Pages” as the correct trigger for this “Page View Tag.”

Name the Tag “Narrativ Page Impression” and double check that the trigger is set to “All Pages”

For the “Check Out Pixel”, create a new tag and open the text field.

This example is using a dummy data layer. You will have to customize “var purchased” to point at how you access the order content in your data layer.

Add box under “Triggering” to add a trigger for this tag.

If you don’t already have a trigger for checkout pages, then it’s easy to create one!

The below example has a series of triggers based off of common URL types for checkout or confirmation pages. (E.g. narrativ.com/checkout/ will trigger the “Checkout Page” option). Replace “checkout” with whatever word your site uses on checkout pages. Remember, you only need one trigger!

Double check the tag name, make sure you’ve updated the code with the information on your checkout page, and make sure you’ve selected the correct trigger.

Make sure that the tag(s) are showing up in the “Tag” tab.

Preview the changes made and fix any errors that pop up in the window.

Click the “Submit” button to save your changes (this step is not final)

Double check that everything you worked on is in this submission. Name the submission something like “Adding Narrativ Pixel” so that it’s easy to find if you need to go back and debug any issues in the future.

You did it!!
If you have any issues during this process then reach out to your Narrativ contact or hello@narrativ.com
Custom Publisher Tags¶
Getting Started¶
The fastest way to get started on the Narrativ platform is to use our provided Javascript tag. Our publisher tag automatically finds the SmartLinks on your page, updates their destination URLs, and tracks user interaction with them. However, if you have a special use case not covered by our default tag, it is possible to write your own custom integration with our APIs.
Page Session Tracking¶
To provide the most accurate performance data on your SmartLinks, Narrativ tracks page session events on your website. These events are grouped by a randomly-generated unique identifier called the Page Session UUID. This identifier is a UUID v4, which looks something like:
8132ac19-109a-466e-8037-540a9bd12798
Your tag will need to generate a new Page Session UUID each time a reader lands on a different page/article. Include this value where indicated when submitting events on your page. Do not reuse Page Session UUIDs across different pages or different users.
Note
If you have a single-page application (SPA), generating a new Page Session UUID on Javascript load may not be enough! Ensure that your UUID changes every time the reader navigates to a new article.
Page Impression Events¶
After generating your Page Session UUID, record the beginning of the page session by firing a Page Impression via the Events API. For example:
POST /api/v1/events/impressions/page_impression/
{
"organization_type": "publisher",
"organization_id": 1,
"user": {
"page_session_uuid": "8132ac19-109a-466e-8037-540a9bd12798"
},
"events": [
{}
]
}
SmartLinks¶
Pages with Existing SmartLinks¶
Next, your tag must identify the SmartLinks in your article which need to have their destination URLs updated. All SmartLinks have the following format:
https://shop-links.co/<auction_id>
For example:
https://shop-links.co/1611792246540568252
Each SmartLink has an Auction ID, a unique 64-bit integer identifying the link.
Warning
Even though the Auction ID is an integer, you must store it as a
string in Javascript. Javascript Number
types are not large enough to
hold 64-bit integers, resulting in data corruption.
LinkMate: Automatic SmartLink Retrieval¶
If your publisher account is a member of our LinkMate program, you can also use the LinkMate API to retrieve SmartLink Auction IDs for the raw URLs in your article. Our systems will automatically create any SmartLinks that do not already exist, so that you no longer need to create them manually in the Chrome Extension.
To use this feature, your tag should submit a list of all distinct external URLs in the body of your article. For example:
POST /api/v1/publishers/2143/linkmate/smart_links/
{
"article": {
"name": "Top Search Engines",
"url": "https://my-blog.com.example/top-search-engines.html"
},
"links": [
{
"raw_url": "https://www.google.com/",
"exclusive_match_requested": true
},
{
"raw_url": "https://www.bing.com/",
"exclusive_match_requested": true
}
]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"smart_links": [
{
"auction_id": "1629787850745092913",
"url": "https://www.google.com/"
},
{
"auction_id": "1629787851069847260",
"url": "https://www.bing.com/"
}
]
}
]
}
Auctions¶
For each distinct Auction ID on your page, submit an Auction API request to obtain the new destination URL. For example:
GET https://api.bam-x.com/api/v1/auction/
?a=1522995078114976993
&t=1517261651
&uuid=8132ac19-109a-466e-8037-540a9bd12798
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"auction_result": {
"id": "1629147433127336253",
"auction_id": "1522995078114976993",
"redirect_url": "https://api.bam-x.com/api/v1/redirect/?a=1522995078114976993&uid_bam=1629147432580451822&ar=1629147433127336253&url=http%3A%2F%2Fwww.shopbop.com.example%2Fkarda-lace-bootie-iro%2Fvp%2Fv%3D1%2F1533877648.htm%3Fsite_refer%3Dbam%26utm_source%3Dbam%26utm_medium%3Dcpc%26utm_campaign%3Dbam%2Bpremium%2Beditorial%26&uuid=8132ac19-109a-466e-8037-540a9bd12798"
}
}
]
}
Then, replace the href
of your link with the new URL. So, an original
link that looks like this:
<a href="https://shop-links.co/1522995078114976993" target="_blank">Shop Now</a>
will become:
<a href="https://api.bam-x.com/api/v1/redirect/?a=1522995078114976993&uid_bam=1629147432580451822&ar=1629147433127336253&url=http%3A%2F%2Fwww.shopbop.com.example%2Fkarda-lace-bootie-iro%2Fvp%2Fv%3D1%2F1533877648.htm%3Fsite_refer%3Dbam%26utm_source%3Dbam%26utm_medium%3Dcpc%26utm_campaign%3Dbam%2Bpremium%2Beditorial%26&uuid=8132ac19-109a-466e-8037-540a9bd12798" target="_blank">Shop Now</a>
Sometimes the same SmartLink appears multiple times in a single article. For instance, you may have a clickable slideshow image and some caption text for the same featured product in your story. In this case, your tag should only submit one Auction API request and update both links to the same destination URL.
SmartLink Events¶
Record the list of SmartLinks on your page by submitting SmartLink Impressions. If the same SmartLink appears multiple times in a single article, record multiple events (even though you only ran the auction once). Here is an example of the events for an article containing one instance of SmartLink 1522995078114976993 and two instances of SmartLink 1611792246540568252:
POST /api/v1/events/impressions/bam_link_impression/
{
"organization_type": "publisher",
"organization_id": 1,
"user": {
"page_session_uuid": "8132ac19-109a-466e-8037-540a9bd12798"
},
"events": [
{
"auction_id": "1522995078114976993"
},
{
"auction_id": "1611792246540568252"
},
{
"auction_id": "1611792246540568252"
}
]
}
Third-Party Event Trackers¶
Some of our retail partners request us to fire their event trackers each time their product links appear on a publisher page. These trackers provide additional insights on your SmartLink performance and help us further optimize your revenue. Auction API responses will list the third-party impression trackers and viewable impression trackers that apply to your SmartLink. For example:
GET https://api.bam-x.com/api/v1/auction/
?a=1522995078114976993
&t=1517261651
&uuid=8132ac19-109a-466e-8037-540a9bd12798
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"impression_pixel_url": "https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?",
"auction_result": {
"tracker_urls": {
"viewable_impression": [
"https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;kw=lv;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?"
],
"impression": [
"https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;kw=li;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?"
]
},
"id": "1629147433127336253",
"auction_id": "1522995078114976993",
"redirect_url": "https://api.bam-x.com/api/v1/redirect/?a=1522995078114976993&uid_bam=1629147432580451822&ar=1629147433127336253&url=http%3A%2F%2Fwww.shopbop.com.example%2Fkarda-lace-bootie-iro%2Fvp%2Fv%3D1%2F1533877648.htm%3Fsite_refer%3Dbam%26utm_source%3Dbam%26utm_medium%3Dcpc%26utm_campaign%3Dbam%2Bpremium%2Beditorial%26&uuid=8132ac19-109a-466e-8037-540a9bd12798"
}
}
]
}
Impression trackers should be fired immediately, while viewable impression trackers should be fired once any occurrence of the SmartLink on the page is scrolled into view.
Tracker URLs may include the template parameter {RAND}
, which must be
replaced with a randomly-generated number prior to firing the tracker.
This parameter is used to prevent HTTP caching of the tracker request and
response:
https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;ord={RAND};dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?"
To fire a third-party event tracker, insert a new hidden HTML img
tag
with the tracker URL as the image source:
<img src="https://ad.doubleclick.net.example/ddm/trackimp/N1234.1234567NARRATIV/B12345678.123456789;dc_trk_aid=123456789;dc_trk_cid=12345678;ord=1629147433127336253;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?" />
Do NOT fire a third-party event tracker more than once per page for the same event, even if the same SmartLink appears multiple times on that page.
Product and Advertiser Information¶
When the auction system identifies an advertiser (retailer/merchant) that is eligible to receive the click on a SmartLink, it may return additional contextual information about the advertiser and the product being sold. For example:
GET https://api.bam-x.com/api/v1/auction/
?a=1629223267830557131
&t=1517261651
&uuid=8132ac19-109a-466e-8037-540a9bd12798
HTTP/1.1 200 OK
Content-Type: application/json
{
"info": {
"error": false,
"status": 200
},
"data": [
{
"auction_result": {
"id": "1629224701990881693",
"auction_id": "1629223267830557131",
"redirect_url": "https://api.bam-x.com/api/v1/redirect/?a=1629223267830557131&uid_bam=1629224701957143181&ar=1629224701990881693&url=https%3A%2F%2Fwww.amazon.com.example%2F&uuid=8132ac19-109a-466e-8037-540a9bd12798",
"product": {
"merchant": {
"url": "https://www.amazon.com/",
"canonical_host": "amazon.com",
"id": 2186,
"name": "Amazon"
},
"bamx_product_category_id": 3,
"name": "Designer Handbag",
"url": "https://www.amazon.com.example/product/1234",
"price": "299.99",
"id": 8030310
}
}
}
]
}
Your tag can use this information to dynamically update the text of your article for a better reader experience.
How to Download Narrativ Chrome Extension¶
Step 3. Sign In¶
The Narrativ extension will appear in the top right corner of Chrome. Click on the icon and sign in with your Narrativ dashboard credentials!*

*Contact your account manager or support@narrativ.com for your Narrativ dashboard access and credentials.
How to Use Narrativ Chrome Extension¶
Step 1. Select a product¶
Navigate to any merchant that sells the product you want to SmartLink and click the Narrativ extension button.

Step 2. (Optional) Select a channel¶
Selecting a channel will filter existing articles to those created in that channel. If you don’t select a channel, none will be assigned.

Step 3. Associate the product link with the story name¶
You can do this in one of two ways:
1. Create a new article link
Type the article name and date next to the gold “+” button, then click CREATE + LINK to create the link and the article.
Distinguish links for newsletters by creating them in the Newsletter channel and naming your newsletter articles “[Newsletter] [Date]”.
See SmartLink Naming Conventions for more best practices in naming articles.

2. Select from the list of existing articles
Select a channel to filter articles in that channel.
Scroll through the drop down box and click LINK next to the article where you want to generate a link.

Step 4. Select Dynamic or Exclusive link¶
Need to ensure the link only goes to one destination?
To make the link exclusive to your selected merchant for a direct sales deal, click the lock icon.
Note that doing this will prevent us from being able to optimize your revenue and replace out of stock links.


Step 5. Create your SmartLink¶
Once you have created the SmartLink, its URL will be copied to your clipboard automatically and is ready for use.
Type the line you want to hyperlink in your CMS (e.g. “Shop Now”).
Paste the SmartLink URL into your hyperlink. When you publish the article, the SmartLink will be live.

SmartLink Naming Conventions¶
1. Edit Name
Ensure the article/ edit name you create matches the article title as shown verbatim on your site and add the editorial publish date to the end.
[Article name] [Date]
The 15 Best Eye Creams 9/15/17
2. Naming newsletters
Ensure that you distinguish between when you will be using SmartLinks in newsletters vs. using them in articles. For newsletters, ensure you enter an edit name as
[Newsletter] [Date]
Newsletter 9/15/17
3. In-article link naming and reviews
Where you want to include a hyperlink to an internal product review and to a merchant for one product, use the following format, putting the second review hyperlink underneath
[Product Brand, Product Name] [Price] (Shop Now) See full review here
La Mer The Illuminating Eye Gel, $150 (Shop Now) See full review here
How to Build a SmartShop¶
Step 1. Sign into the Narrativ Dashboard¶
Select the SMARTSHOP button from the top navigation bar.
Step 2. Create a New SmartShop¶
Click + Create New SmartShop or simply click on an existing shop to make edits.

Step 3. Type in a SmartShop name and Edit name¶
SmartShop name
Ensure you include which position number the SmartShop will have in the article
Include a description of the contents in the name to make analysis easy
Edit name
Type in or select an edit name to associate the box with an article
Ensure the article/ edit name you create matches the article title as shown verbatim on your site and add the date to the end e.g., The 15 Best Eye Creams 9/15/17
Step 6. Enter product information¶
Fill out the product and image information for each tile you want to create.
For product images you can either:
Drag and Drop an image from your desktop
Upload an image from your files
Copy paste an image address link
Click out of the modal to close it when you’re done
Step 7. Preview your SmartShop¶
Preview your SmartShop using the mobile preview screen on the right hand side. This updates in real time to reflect your latest changes.
Preview screen let’s you see the scroll function and if you hover over products you will also see the met data that will be displayed.

Note: You can click on the arrows next to product number to re-order the products in the box
Step 8. Fine tune your SmartShop¶
Title - Add a title for the whole unit (e.g. “Refresh Your Skin”)
Sponsored by - Add a merchant logo to display as “Sponsored By”
Hover data - Change the meta-data that is displayed for each product
choose between information displayed below the product or on hover
Shop button - Turn on or off the “Shop” button displayed on hover
Step 9. Hit Publish¶
Select the blue Publish button in the top right corner to save your changes and create code for the unit that you will drop into your CMS
Step 10. Select the code type you want to drop into your CMS¶
Copy/Paste the code into your site CMS
Note: Making changes and editing your SmartShop¶
Once the code is pasted in your story, and your unit is live on site you can navigate to the SmartShop builder on our dashboard to make changes to it at any time. Simply make any changes you want and re-click the “Publish” button when you’re done to push those changes to the unit on site. The changes should be live within ~5 minutes.
Help and Support - Feel free to reach out to your account manager or support@narrativ.com with any questions. We’re always happy to help!
Product Feeds¶
Ingesting Product Feeds¶
We can set up a call with engineering teams to set up a preferred method of delivering us your product feed. We can either fetch your feed or you can send it to us via HTTP, FTP or SFTP using the specifications detailed below. We currently support CSV and XML file formats and zip and gzip compressed files. If you have any questions, please feel free to reach out to hello@narrativ.com for assistance.
Send via FTP¶
Note: Enable passive and binary modes
Field Name |
Value |
---|---|
Host |
feeds.bam-x.com |
Static IP |
52.7.95.122 |
Port |
2221 |
Username |
Will be provided to you |
Password |
Will be provided to you |
Filename |
USERNAME-USD-yyyy-mm-dd.csv.zip |
Send via SFTP¶
Please generate and provide us with a public RSA key to register as an authorized key for your users.
Field Name |
Value |
---|---|
Host |
feeds.bam-x.com |
Static IP |
52.7.95.122 |
Port |
2223 |
Username |
Will be provided to you |
Filename |
USERNAME-USD-yyyy-mm-dd.csv.zip |
Privacy Policy¶
The Narrativ Company, Inc. (“Narrativ”) takes your privacy very seriously. This Privacy Policy explains how Narrativ collects, uses, and discloses information, and your choices for managing your information preferences.
What This Policy Covers¶
This Privacy Policy describes Narrativ’s data practices associated with our website (https://narrativ.com) and Narrativ services (“Services”), and the choices that Narrativ provides in connection with our collection and use of your information. This Privacy Policy is intended for website publisher customers (“Publishers”), website merchant customers (“Merchants”) and individual users of websites and apps. For Publishers and Merchants, this Policy explains how Narrativ may collect, use and disclose information associated with your company and with your company’s websites and apps that use Narrativ Services. For individual website and app users, this Privacy Policy explains how Narrativ may collect, use, and disclose information when you visit our website or when you use any website or app that uses Narrativ Services.
Publishers and Merchants and other clients may also have their own policies that govern how they collect, use, and share data. These policies may differ from Narrativ’s policies described in this Privacy Policy. Please consult the privacy policies of the websites you visit and apps you use to become familiar with their privacy practices and to learn about any choices that these companies may offer with respect to their information practices. In addition, any website containing our Services may contain links to websites or content operated and maintained by third parties, over which we have no control. We encourage you to review the privacy policy of a third-party website before disclosing any information to the website.
Information Collection and Use¶
Narrativ collects data in a variety of ways - including through the use of log files, pixel tags, cookies, and/or similar technologies. Examples of the types of data that we collect are:
Browser information (e.g. URL, browser type, “click through” data)
Ad reporting or delivery data (e.g. size/type of ad, ad impressions, location/format of ad, data about interactions with the ad)
Device-type information (e.g. screen dimensions, device brand and model)
Information about your activities on our website and Services
We may combine information that does not directly identify an individual with data collected from other sources and disclose the combined information to participating publishers, advertisers and ad networks so that they can determine whether to bid on ad inventory and in order to improve the relevance of the advertising presented to users. We also use the information we collect to host, operate, maintain, secure, and further develop and improve our Services, such as to keep track of advertising delivery and to measure the effectiveness of advertising delivered through our Services, and investigate compliance with Narrativ’s policies and terms and conditions. Some of the third parties that we work with may contribute additional data to us directly, which we may combine with our own in order to help us provide a better service. We do not collect any information that could be used to directly identify an individual.
Narrativ does not engage in activities that require parental notice or consent under the Children’s Online Privacy Protection Act (COPPA). If you believe that Narrativ has inadvertently collected information from a child under 13 that is subject to parental notice and consent under COPPA, please contact Narrativ using the contact information below to request deletion of the information.
Cookies and Other Similar Technologies. We use cookies (a small file containing a string of characters that uniquely identifies your Web browser), Web beacons (an electronic file placed within a Web site that monitors usage), pixels, etags, and similar technologies to operate and improve our website and Services, including for interest-based advertising as described below. Some of our Service Providers (defined below) may also use such technologies in connection with the services they perform on our behalf.
Information Sharing¶
We will disclose contact and billing information to third parties only as described in this Privacy Policy:
with your express permission;
with our affiliates, which include entities controlling, controlled by, or under common control with Narrativ;
where we contract with third parties to provide certain services, such as advertising, analytics, data management services, web hosting, and web development (“Service Providers”). We ask Service Providers to confirm that their privacy and security practices are consistent with ours, we provide our Service Providers with only the information necessary for them to perform the services we request, and Service Providers are prohibited from using such information for purposes other than as specified by Narrativ;
in the event that Narrativ is merged, sold, or in the event of a transfer of some or all of our assets (including in bankruptcy), or in the event of another corporate change, we may disclose or transfer information in connection with such transaction; and
where we believe it is necessary to protect Narrativ or our users; to enforce our terms or the legal rights of Narrativ or others; or to comply with a request from governmental authorities, legal process, or other legal obligations.
We may also share and disclose other information that we collect, including aggregate information, as we consider necessary to develop and provide our Services, including in the ways described above. The information that we share in this way would not be considered to personally identify an individual.
Narrativ may also be required to disclose information in response to lawful requests by public authorities, including to meet national security or law enforcement requirements.
Interest-Based Advertising and Opting Out¶
Narrativ adheres to the Digital Advertising Alliance (DAA) Self-Regulatory Principles in the US and to the European Digital Advertising Alliance (EDAA) Principles in the EU and the IAB Europe OBA Framework. We are also a member of the Network Advertising Initiative and adhere to the NAI’s Code of Conduct.
The Narrativ Ad Exchange uses cookies, Web beacons, pixels, etags, and similar technologies to give Publishers the possibility to offer, and Ad Exchange advertisers the ability to show, targeted ads on the device on which you are viewing this policy or a different device. These ads are more likely to be relevant to you because they are based on inferences drawn from location data, web viewing data collected across non-affiliated sites over time, and/or application use data collected across non-affiliated apps over time. This is called “interest-based advertising.” In addition, certain third parties may collect data on the Narrativ website and combine this data with information collected from other websites over time for purposes that include interest-based advertising.
Opting Out for Cookie-Based Services: If you would like to learn more about this type of advertising, or would prefer to opt out of website interest-based advertising enabled by Narrativ’s Ad Exchange, European Union residents may opt-out of this form of advertising by companies participating in the EDAA at www.youronlinechoices.com and all other users may visit www.aboutads.info/choices to opt out of this form of advertising by companies participating in the DAA self-regulatory program. Please note that in order for your opt-out choice to be effective using this tool, you must ensure that your browser is set to accept third-party cookies such as the Narrativ opt-out cookie. Some browsers block third-party cookies by default, and you may need to change your browser settings to accept third-party cookies before opting out.
Opting Out for Certain Non-Cookie Services (in applicable countries): To help identify your browser and/or possible relationships between different browsers and devices, Narrativ or our partners may use the local storage or cache in your browser. Using the browser cache or local storage helps Narrativ or our partners deliver interest-based advertising to a browser without the use of third-party cookies. We are using local storage only for application processing, not for any tracking processes. To opt out of Narrativ’s use of local storage or the browser cache to provide its services, please (1) use any tools provided by your browser to clear local storage and the browser cache, and (2) turn on any “Do Not Track” header setting offered by your browser. As long as the two steps are completed and maintained on a browser, Narrativ will not use local storage or the cache on that browser to identify and sync browsers and devices. If you also want to opt out of Narrativ’s use of third-party cookies for interest-based advertising as enabled by Narrativ’s Ad Exchange, please see instructions above.
Opting Out for Mobile Application Data: To opt out of Narrativ’s collection, use, and transfer of data for interest-based advertising on mobile apps, you may download the DAA’s AppChoices application from the Android or iOS app store on your mobile device. Users outside the United States may not have access to this application; instead, you can use “Limit Ad Tracking” in your iOS settings or “Opt out of interest-based ads” in your Android settings to limit Narrativ’s collection of data for interest-based advertising.
Opting Out for Location Data: You may opt out of our collection, use, and transfer of precise location data by using the location services controls in your mobile device’s settings. Effect of Opting Out: If you use a different device or browser, or erase cookies from your browser, you will need to renew your opt-out choice.
If you opt out of Narrativ’s practices, you may continue to receive interest-based advertising through other companies. Third-party advertisers and ad networks that participate in the Narrativ Ad Exchange may also use their own cookies and other ad service technologies to display and track their ads. We do not control and are not responsible for such third-party advertisers’ and ad networks’ information practices or their use of cookies and other ad service technologies. To learn more about the practices of these companies, please read their privacy policies.
Even if you opt-out, Narrativ may continue to collect data for other purposes and you still will receive advertising from the Narrativ Ad Exchange when you visit websites of a Publisher who uses our Services – but such advertising will not be targeted to you.
Reviewing and Updating Information¶
Narrativ takes reasonable steps to ensure that information is accurate, complete, current, and reliable for its intended use. For contact or billing information submitted through our website, you may review, correct, update, or change your information, request that we deactivate your account, or remove your information from our direct marketing efforts, at any time by e-mailing us at privacy@narrativ.com.
International Information Transfers¶
Please be aware that the information we collect, including contact and billing information, may be transferred to and maintained on servers or databases located outside your state, province, country, or other jurisdiction, where the privacy laws may not be as protective as those in your location. If you are located outside of the United States, please be advised that we process and store information in the United States and your consent to this Privacy Policy or use of Narrativ Services represents your agreement to this processing.
Security¶
Information that we collect is stored using procedures and practices reasonably designed to help protect information from unauthorized access, destruction, use, modification, or disclosure.
Policy Updates¶
From time to time, we may change this Privacy Policy. If we decide to change this Privacy Policy, in whole or in part, we will inform you by posting the revised Privacy Policy on the Narrativ website. Those changes will go into effect on the effective date disclosed in the revised Privacy Policy.
Contact Us¶
If you have any questions or concerns regarding this Narrativ Privacy Policy, please contact us by emailing us at privacy@narrativ.com.