Overview
SmartNews Pixels are small snippets of code can be added to all of the pages where you wish to track user behavior. You can measure the effectiveness of your conversion funnel and calculate your exact return on investment from SmartNews ads.
General workflow for setting up SmartNews Pixels:
1Create a new Pixel from the Events tab in Ads Manager.
2Set up an event which will be used to track the specific behavior we want to track, for example, “Add to Cart”.
3Add the Pixel’s base code to all the pages where you want to track user behavior.
4Add the event code to the page that will be used to track the behavior, such as the checkout end page. Alternatively, if you wish to track events from a clickable element like a button or link, you can set up events to use a URL configuration instead of an event code.
5We recommend you set up multiple events to track the full funnel of conversions. SmartNews provides a set of 22 standard events right out of the box.

Capturing the checkout conversion funnel with a SmartNews Pixel
Three ways to set up events:
- Add an event code snippet to the <body> section of the web page you wish to track.
- Add an event code snippet together with a Pixel base code to the <head> section of the web page you wish to track.
- Use the URL configuration setting to map an event to your custom URL structure.
Pixel creation in Ads Manager
1Go to Events tab in Ads Manager and select Create new Pixel.

2Provide a name for your new Pixel.
3Select Download code and have your web development team implement the Pixel base code on your website.

Adding Pixel base codes to your site
The base code should be added to the header section of the advertiser’s website. As a best practice, we highly recommend that you add the Pixel base code between the opening and closing <head> tags on every page where you will be tracking visitor actions. Most companies add it to their website’s persistent header so that it can be used on all pages. Placing the code within the <head> tags also reduces the chances of browsers or third-party code blocking the Pixel’s function.
Finally, it’s best to implement just one set of Pixel codes per website. If you plan to implement more than one set of Pixel codes on a single website, please check with us first.
<!-- SmartNews Ads Pixel Code -->
<script type="text/javascript">
!function(){if(window.SmartnewsAds=window.SmartnewsAds||{},!window.SmartnewsAds.p){var e=window.SmartnewsAds.p=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};e.push=e,e.version="1.0.1",e.queue=[];var n=document.createElement("script");n.async=!0,n.src="//cdn.smartnews-ads.com/i/pixel.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s)}}();
SmartnewsAds.p("[pixel ID]", "PageView");
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://i.smartnews-ads.com/p?id=[pixel ID]&e=PageView" />
</noscript>
Setting up event tracking
Three ways to set up events:
- Add the Pixel base code to the <head> section across your website and various event codes on web pages where you wish to track conversion events.
- Add the Pixel base code together with event codes in the <body> section on web pages where you wish to track conversion events.
- Add just the base code to the <head> section and use the Events Manager’s URL configuration tool to set up event tracking.
Adding event codes to your web pages
Add a single line of event code to the web pages where you wish to track conversions. For example, the event code for the Purchase event is SmartnewsAds.p(“[pixel ID]”, “Purchase”). Add this line to pages where customers can make purchases. Here’s an example of a SmartNews Pixel base code with a “Purchase” event:
<!-- SmartNews Ads Pixel Code -->
<script type="text/javascript">
!function(){if(window.SmartnewsAds=window.SmartnewsAds||{},!window.SmartnewsAds.p){var e=window.SmartnewsAds.p=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};e.push=e,e.version="1.0.1",e.queue=[];var n=document.createElement("script");n.async=!0,n.src="https**:**//cdn.smartnews-ads.com/i/pixel.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s)}}();
SmartnewsAds.p("**[pixel ID]**", "PageView");
SmartnewsAds.p("**[pixel ID]**", "Purchase");
</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://i.smartnews-ads.com/p?id=**[pixel ID]**&e=PageView" />
<img height="1" width="1" style="display:none;" alt="" src="https://i.smartnews-ads.com/p?id=**[pixel ID]**&e=Purchase" />
</noscript>
Use URL configuration to track events
In addition to Pixel event codes, URL configuration can be used to define how an event is tracked. On the event setup screen, select URL configuration and define an URL rule by specifying a URL match type and entering the corresponding URL information.

A unique combination of URL match type and URL can be used to define how a standard event is tracked. Three match types are available:
URL is
- Our system will attempt to do an exact match to the URL provided and record the corresponding event. For example, whenever the exact URL www.domain.com/purchase-complete is loaded, a Purchase event is recorded.
URL starts with
- Any URL that starts with the string of texts provided will trigger this rule. For example, a URL that starts with www.domain.com/search could be used to track the actions of users searching products and going to a search result page if your search result page has the URL format of www.domain.com/search/keywords.
URL contains
- Any URL that contains the entered string will trigger this rule and record the corresponding event.

SmartNews automatically detects the validity of each rule. If two or more rules have conflicting logic, the setup screen displays an error message, and the rule cannot be saved. Once a URL configuration rule is successfully saved, the event and rule appear in the Events tab.
You can edit or remove a URL configuration at any time. If you’ve added a Pixel event code to your website and later decide to switch to a URL configuration rule for the same event, the URL configuration rule will be used to track events in Ads Manager, replacing the event code. If you remove the URL configuration, event tracking will revert to the Pixel event code, provided it’s correctly installed on your website.

SmartNews standard events
Below is a list of 22 standard event types for user behavior tracking available from the Events tab.
Most commonly used event types
Event name | Event code |
---|---|
Purchase | SmartnewsAds.p(“pixel tag ID”, “Purchase”) |
Add To Cart | SmartnewsAds.p(“pixel tag ID”, “AddToCart”) |
Initiate Checkout | SmartnewsAds.p(“pixel tag ID”, “InitiateCheckout”) |
Submit Form | SmartnewsAds.p(“pixel tag ID”, “SubmitForm”) |
Subscribe | SmartnewsAds.p(“pixel tag ID”, “Subscribe”) |
Complete Registration | SmartnewsAds.p(“pixel tag ID”, “CompleteRegistration”) |
Contact | SmartnewsAds.p(“pixel tag ID”, “Contact”) |
Sign Up | SmartnewsAds.p(“pixel tag ID”, “SignUp”) |
View Content | SmartnewsAds.p(“pixel tag ID”, “ViewContent”) |
Other event types
Event name | Event code |
---|---|
Add Payment Info | SmartnewsAds.p(“pixel tag ID”, “AddPaymentInfo”) |
Add To Wish List | SmartnewsAds.p(“pixel tag ID”, “AddToWishList”) |
Visit Cart | SmartnewsAds.p(“pixel tag ID”, “VisitCart”) |
Customize Product | SmartnewsAds.p(“pixel tag ID”, “CustomizeProduct”) |
Search | SmartnewsAds.p(“pixel tag ID”, “Search”) |
Booking | SmartnewsAds.p(“pixel tag ID”, “Booking”) |
Download | SmartnewsAds.p(“pixel tag ID”, “Download”) |
Start Trial | SmartnewsAds.p(“pixel tag ID”, “StartTrial”) |
Share | SmartnewsAds.p(“pixel tag ID”, “Share”) |
Login | SmartnewsAds.p(“pixel tag ID”, “Login”) |
Donate | SmartnewsAds.p(“pixel tag ID”, “Donate”) |
Find Location | SmartnewsAds.p(“pixel tag ID”, “FindLocation”) |
Time Spent | SmartnewsAds.p(“pixel tag ID”, “TimeSpent”) |
Standard event parameters
These parameters are optional, JSON-formatted objects that you can include and associate with standard events. They allow you to track additional information about your website visitors’ actions. Once tracked, parameters can be used to further define any custom audiences you create. For example, when “Purchase” is tracked as a standard event, it’s usually worthwhile to track and send additional parameters such as product IDs, categories, and the number of products purchased, along with the total transaction value.
Parameters supported by SmartNews standard events:
Parameter | Data Structure | Description/Examples |
---|---|---|
content_category | string | Category of the page or product |
content_id | array of integers or strings | Product ID associated with the event |
content_name | string | Page or product name |
currency | string | JPY, USD, EUR |
content_type | string | product or product_group |
contents | array of objects | [{‘content_id’: ‘ABC123’, ‘quantity’: 2}, {‘id’….., ‘quantity’:…}] |
event_value | integer or float | Value associated with the event (transaction value in chosen currency) |
keyword_query | string | Search query |
status | boolean | Whether or not user has completed registration |
quantity | integer | The number of items purchased |
time_spent | integer | In seconds |
ltv | integer | The lifetime value of the user |
<!-- SmartNews Ads Pixel Code -->
<script type="text/javascript">
!function () {
if (window.SmartnewsAds = window.SmartnewsAds || {}, !window.SmartnewsAds.p) {
var e = window.SmartnewsAds.p = function () {
e.callMethod ? e.callMethod.apply(e, arguments) : e.queue.push(arguments)
};
window.SmartnewsAds._p || (window.SmartnewsAds._p = e), e.push = e, e.version = "1.0.0", e.queue = [];
var n = document.createElement("script");
n.async = !0, n.src = "https://cdn.smartnews-ads.com/i/pixel.js";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(n, s)
}
}();
SmartnewsAds.p("[pixel ID]", "Purchase", {
"currency": "JPY",
"event_value": 600000,
"content_ids": [400, 401, 402],
"content_type": "item"
});
</script>
// Choice 1
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://i.smartnews-ads.com/p?id=[pixel ID]&e=[event name]" />
</noscript>
// Choice 2
// one "&d%5B[additional_parameter_key]%5B=[additional_parameter_value]" will only represents one pair of key value.
// example for above will be:
// https://i.smartnews-ads.com/p?id=[pixel ID]&e=[event name]&d%5Bcurrency%5B=JPY&d%5Bevent_value%5B=600000&d%5Bcontent_ids%5B=400&d%5Bcontent_ids%5B=401&d%5Bcontent_ids%5B=402
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://i.smartnews-ads.com/p?id=[pixel ID]&e=[event name]&d%5B[additional_parameter_key]%5B=[additional_parameter_value]" />
</noscript>
Validating Pixels
You can test if a Pixel is set up on your website correctly by selecting Validate Pixel under the Pixels tab. This opens the Pixel validator.

Enter the web page where your Pixel’s event code is installed and select Open & validate.

If your base code and event codes are set up correctly, you should see the following message at the top of the validator window:

Validating Pixels on dynamic pages
When setting up Pixels on dynamic pages like an ASP.NET page, the Pixel validator might mistakenly report that the Pixel hasn’t fired. For dynamic pages like these, specific user actions may be required that the validator can’t test for using just a URL.
In such cases, you can verify if a Pixel has fired by checking the “Last Event Received” column under the Events tab. If you see events being recorded after an action is completed, your Pixel is implemented correctly.
If you need to use the same event code for multiple URLs, we recommend disabling all the event codes and testing each one individually.
