OneStat

Free customer support included.

We provide free customer support and will try to answer your questions to the best of our ability.

D. Commerce and Advertising script implementation


OneStat AdWorks, eBusiness, Platinum and Enterprise have the ability to track the revenue of your online business, customer behavior and conversions of your online advertising campaigns. In this section we describe the implementation of the commerce script and how to activate tracking of your online advertising campaigns.

Brief explanation of the concept
Campaign tracking
Conversion tracking
Commerce tracking
Account options and custom fields
Manage click in & out links / banners

Commerce and Advertising script implementation - Brief explanation of the concept


Visitor

A visitor is someone who visits your website. Visitors are identified by their IP-address and a unique visitor code on their system. This unique visitor code is stored as a cookie on the visitors system. For privacy reasons no personal information of visitors is stored by the OneStat.com service. All visitors are completely anonymous.

Unique Visitor

A unique visitor is the number of different individuals who visit your site during a given period. The number of unique visitors depends on the reporting period. OneStat.com measures:

Hourly Unique Visitors:
Daily Unique Visitors
Weekly Unique Visitors
Monthly Unique Visitors
Yearly Unique Visitors

Example: Suppose a visitor visits your website for the first time on July 31 and visits your website again two times on August 20 at 10 AM and 5 PM. This visitor is than counted once as a yearly unique visitor, once as a monthly unique visitor for July and August. On August 20 this visitor is once counted as a daily unique visitor and twice as a hourly unique visitor.

Due to this measuring system the number of hourly unique visitors is per definition greater or equal than the number of daily unique visitors. Also the number of daily unique visitors is greater or equal than the number of weekly unique visitors, which is greater than or equal than the number of monthly unique visitors, which is greater than or equal than the number of yearly unique visitors.

Pageview

A pageview is measured each time a visitor views a page of your website. To measure pageviews it is necessary to implement the OneStat Script on that page of your website.

Visit

A visit (also sometimes called a session) is a measured each time a visitor visits your website. A new visit is counted when the visitor return to your website after a given timeout period. This visit timeout period is by default set to 30 minutes and can be modified in the OneStat settings manager. If a visitor visits multiple pages within the visit timeout period than these pageviews are part of the current visit and the system measures the click path of this visit.

Example:

Suppose a visitor visits your website 3 times a day on 9:00 AM and views 3 pages, on 9:15 AM and views 2 pages and on 4:00 PM and views 4 pages. In this example the OneStat system measures 2 visits. The first visit from 9:00 AM to 9:45 AM having 5 pageviews., and the second visit from 4:00 PM to 4:30 PM of 4 pageviews. Because the second time the visitor visits your website is within in the visit time period of 30 minutes all the pages viewed from 9:00 AM to 9:45 AM are considered one visit.

OneStat script code

The Onestat script code is a small piece of HTML and Javascript code you include with all the pages on your website you want to measure. You can retrieve the OneStat script code in the settings manager. You can choose between a generic script that you can put unmodified on each page, or you can use the script manager to generate a specific page for that page. To measure conversion and commerce you have to modify the OneStat script code for that specific page and action.

Commerce action

A commerce action is a specific action a visitor performs on your website. I.e. a subscription to a newsletter, a request for an offer, a purchase of a product. You measure these transaction by defining commerce actions in the OneStat settings manager and by modifying the OneStat script on that specific page.

Commerce and Advertising script implementation - Campaign tracking

With campaign tracking you can easily track the visitors coming from your advertising suppliers. You should use campaign tracking for the measurement of organic and paid search engine listings and for the tracking of your advertising campaigns. The method to track campaigns is by adding an extra url-parameter to the target url on your advertising links. The extra url-parameter must have the name 'osadcampaign'. The Onestat tracking script will detect the extra url-parameter and will register the visit to the correct campaign.

For example to track visitors from your Google adwords campaign you use the following url:

http://www.mywebsite.com/advertising.html?osadcampaign=google

When the visitor clicks on this URL he is redirected to the url http://www.mywebsite.com.advertising.html page. The OneStat system detects the additional url-parameter osadcampaign and assigns this visit to the Google adwords campaign.

In the OneStat settings manager you must define a campaign to match the used url-parameters. In the example above you must add a campaign with the campaign identifier set to the value 'Google'.

Step by step implementation
Step 1: Add your campaigns
Use the settings manager to manage the campaigns you want to track. In the settings manager select the 'campaign manager' option. Next click on the "Add Campaign" button to add a new campaign.

(HIER KOMT EEN PLAATJE)

In the campaign form you can enter the following fields:

Campaign Identifier
This is the matching value of the 'osadcampaign' url-parameter for this campaign.

Description
The description for this campaign that will be displayed in the various reports.

Cost method
Select the cost method that apply for this campaign. The following settings can be used:

- None: no cost is defined for this campaign
- Per Click: costs are calculated on a per click basis. The price field determines the price per click.
- Per Period: costs are calculated on a per period basis. You can select a period of one day, week, month, quarter or year. The price field determines the price in the selected period.
- Per Date Range: costs are calculated on a per date range basis. Enter the start and end date of the date range. The price field determines the price in the selected period.

Price
The price of the campaign. This value relates to the chosen cost method. In the example above the costs are defined as 0.25 per click.

Step 2: Modify your target urls
Modify your target urls by adding the additional url-parameter 'osadcampaign'. Make sure that the value of the osadcampaign parameter matches the campaign identifier field in the campaign definition form.

Commerce and Advertising script implementation - Conversion tracking

Conversion tracking is the tracking of specific behavior of your visitors that lead to a specific action or transaction. I.e. the tracking of a signup to a newsletter or the tracking of product purchases. With OneStat you can define your own various actions you want to track to a conversion. By modifying the OneStat script code you can identify pages on your website that correspond to a specific action. I.e. the order confirmation screen of a product purchase identifies an order.

Conversion tracking is not limited to the tracking of actual sales. You can use conversion tracking to track al the actions that are important to your website. Some examples are:

- The signup for a newsletter
- Signup for a trial version of your product
- A request for more information
- The registration to the restricted content of your website
- The sale of a product
- A download of an article

With conversion tracking the OneStat system measures additional information about your website visitors. The detailed information of the FIRST (initial) visit of a visitor (entry page, referring url , referring domain, search engine, search phrase, country and location) are stored. By the use of this additional information it is possible to calculate a report to analyze the initial visit information to an action. I.e. to display the search phrases the customers used to initially find your website. To uniquely identify a visitor a unique cookie with a visitor-id is stored on the system of the visitor.

Step by step implementation

Step 1: Activate the Commerce module
To measure the additionally visitor information you must activate the Commerce module for your account. Go to the settings manager and selected the option "Account options". Next activate the commerce module. For OneStat AdWorks or OneStat e-Business users the Commerce module is activated automatically.

Step 2: Define your campaigns
To track conversions from your advertising campaigns set up the campaigns in the settings manager and add the url-parameter 'osadcampaign' to your target urls.

Step 3: Define your actions
Use the settings manager to manage the actions you want to track. In the settings manager select the 'commerce action manager' option. Next click on the "Add Action" button to add a new action.

(HIER KOMT EEN PLAATJE)

After you have defined an action, the system automatically assigns a unique action-number to your new action. This action-number must match the osp_ACTION variable in the OneStat script on the pages that correspond to the action.

In the action form you can enter the following field:

Description
A description for your action that is being displayed in various reports.

Customer identifying
Check this checkbox if this action identifies a customer on your website. This value is used in the customer reports to identify customers from non customers. In a situation where you have 2 actions (trial and order) you would check the customer identifying field on the order-action and not on the trial-action.

Scenario and scenario step
Use the scenario field to combine multiple actions to a scenario. I.e. if you have a sales trajectory of the actions trial, offer and order you assign the scenario name sales to your action. The scenario step field determines the position of this action in your sales scenario. Based on the scenario and scenario steps it is possible to compute the conversion rates from step top step. In this example the conversion from lead to offer and from offer to order. You can define multiple scenarios for your account.

Step 4: Modify the OneStat script
First identify the pages of your website that should be tagged for this action. On these pages you have to modify the OneStat script to include the ACTION variable. This can be done in the following steps:

Get the latest version of the Commerce and Conversion tracking OneStat script. Go to the settings manager and select the option "Latest script". Copy and paste the script to the html-source of your webpage. Put the script immediately after the <body> tag or just before the closing </body> tag.

The osp_ACTION variable holds the action number of the action. Refer to the commerce manager for the action numbers of the actions you have defined. The osp_ACTION variable is mandatory for tracking actions. Example

var osp_ACTION = "1";

Commerce and Advertising script implementation - Commerce tracking

Commerce tracking is an extension to the conversion tracking features as described in the section "Conversion Tracking". With commerce tracking you can extend the tracked actions with additional properties such as:

Transaction ID
The unique transaction ID you assign to an action. The transaction id can be the unique order number the back office of your website generates.

Product-code
The product code of the action.

Product-group
The product group of the action

Transaction amount
The transaction amount of this action.

Step by step implementation

Step 1: Activate the Commerce module
To measure the additionally visitor information you must activate the Commerce module for your account. Go to the settings manager and selected the option "Account options". Next activate the commerce module. For OneStat AdWorks or OneStat e-Business users the Commerce module is activated automatically.

Step 2: Define your campaigns
To track conversions from your advertising campaigns set up the campaigns in the settings manager and add the url-parameter 'osadcampaign' to your target urls. For more information about setting up campaigns refer to page 77.

Step 3: Define your actions
Use the settings manager to manage the actions you want to track. In the settings manager select the 'commerce manager' option. Next click on the "Add Action" button to add a new commerce action.

(HIER KOMT EEN PLAATJE)

After you have defined an action, the system automatically assigns a unique action-number to your new action. This action-number must match the osp_ACTION variable in the OneStat script on the pages that correspond to the action.

In the action form you can enter the following field:

Description
A description for your action that is being displayed in various reports.

Customer identifying
Check this checkbox if this action identifies a customer on your website. This value is used in the customer reports to identify customers from non customers. In a situation where you have 2 actions (trial and order) you would check the customer identifying field on the order-action and not on the trial-action.

Scenario and scenario step
Use the scenario field to combine multiple actions to a scenario. I.e. if you have a sales trajectory of the actions trial, offer and order you assign the scenario name sales to your action. The scenario step field determines the position of this action in your sales scenario. Based on the scenario and scenario steps it is possible to compute the conversion rates from step top step. In this example the conversion from lead to offer and from offer to order. You can define multiple scenarios for your account.

Step 4: Modify the OneStat script
First identify the pages of your website that should be tagged for this action. On these pages you have to modify the OneStat script to include the ACTION variable. This can be done in the following steps:

Get the latest version of the Commerce and Conversion tracking OneStat script. Go to the settings manager and select the option "Latest script". Copy and paste the script to the html-source of your webpage. Put the script immediately after the <body> tag or just before the closing </body> tag.

Modify the commerce script variables to reflect the exact commerce properties of this action. The following commerce variables can be specified.

Script Variable

Description

osp_ACTION

The osp_ACTION variable holds the action number of the commerce action. Refer to the commerce manager for the action numbers of the actions you have defined. The osp_ACTION variable is mandatory for tracking commerce actions.

osp_TRANSACTION

The osp_TRANSACTION variable specifies the transaction id you assign to this commerce action. I.e. you can use your order-number or invoice-number as the transaction id. The transaction id is used to match different actions in a scenario. The osp_TRANSACTION variable is optional, if you don’t use the transaction-id leave the field empty.

osp_AMOUNT

The osp_AMOUNT variable specifies the amount of the transaction. This variable is optional, if you don’t use an amount leave the field empty. The amount must be specified using a decimal-point as the numeric decimal separator and without a currency symbol. The currency used can be setup in the commerce section of the account options.

osp_PRODUCTCODE

The osp_PRODUCTCODE variable specifies the product-code of the transaction. This variable is optional, if you don’t use a product code leave the field empty. The product -code can be any combination of letters and digits.

osp_PRODUCTGROUP

The osp_PRODUCTGROUP variable specifies the product-group of the transaction. This variable is optional, if you don't use a product-group leave the field empty. The product-group can be any combination of letters and digits.


The following example specifies a transaction with a transaction-id of 67001, an amount of 195.90, a product-code of 'SONYDSC-P72' and a product-group of 'DIGITAL CAMERAS'

var osp_ACTION = "1";
var osp_TRANSACTION = "67001";
var osp_AMOUNT = "195.90";
var osp_PRODUCTCODE = "SONYDSC-P72";
var osp_PRODUCTGROUP = "DIGITAL CAMERAS";

Commerce and Advertising script implementation - Account options and custom fields

In the settings manager you can setup various specific settings for the Advertising and Commerce module. To modify these settings go to the Account Options section in the settings manager. Next activate the commerce module and the additional options for the commerce module will become visible. The following options can be set:

Currency symbol
The commerce module has the ability to track the amount of an order. Set the currency symbol to the correct country specific currency that matches your settings.

Visitor Stickiness Timeout
The commerce and advertising module tracks detailed information of the first visit of a visitor (i.e. the initial search engine and search phrase a visitor used to reach our site). The visitor stickiness timeout determines the period the detailed information of the first visit are remembered. If a visitor does not visit your site within the visitor stickiness timeout then the following first visit of that visitor is treated as a first visit and the initial visitor details are overwritten. The default timeout is set to 30 days.

Commerce and Advertising script implementation - Manage click in & out links / banners

OneStat Platinum and Enterprise measure link click in & out, banners and banner campaigns. The definition of a click-in is that you want to measure a link on another site than yours which is forwarding to your web site. The definition of a click-out is a link on your own web site which is forwarding to another site as yours. To measure click-ins or click-out please take the following steps:

1. Go to the settings manager
2. Select Click-in / click-out links
3. Select click-out link or click-in link
4. Fill in the name you want to give to the link
5. Fill in the description you want
6. Fill in the destination URL. This is the URL where the link will forward when visitors 7.click on the link.
8. Select link page when it is a link on your own web site.
9. Click OK and go to modify of the particular link

Here you can select 5 codes:
The URL itself
URL in a text link
URL in an image link
To hide the URL in the status bar in a text link
A code to hide the URL In the status bar in an image link

OneStat Platinum and Enterprise measure also click-in banners, click-out banners and banner campaigns. The definition of a click-in is that you want to measure a banner on another site than yours which is forwarding to your web site. The definition of a click-out is a link on your own web site which is forwarding to another site as yours. To measure banner click-ins / click-outs and banner campaigns please take the following steps:

1. Go to the settings manager
2. Select manage banner campaigns
3. Select click-out banner or click-in banner
4. Fill in the name you want to give to the banner
5. Fill in the description you want
6. Fill in the destination URL. This is the URL where the banner will forward when visitors click on the banner.
8. Banner image: fill in the URL where banner image can be found
9. Fill in the Alt Text
10. Fill in the name of the campaign. The name of the banner and campaign can be different.
11. Click OK and go to modify of the particular banner

Here you can select 5 codes:
The URL itself
URL in a text link
URL in an image link
To hide the URL in the status bar in a text link
A code to hide the URL In the status bar in an image link

You can also measure dynamic parameters to OneStat Link URLs:

This section of the manual describes the advanced feature to pass dynamic parameters to the OneStat click-in and click-out links and banner-links. You can use this feature in a server-side script to extend in runtime the defined link-urls of an OneStat Link.

OneStat Links are defined in the Settings manager with the Click-in/Click-out option or the Banner Campaign option. The following is an example of a click-out link:

OneStat Account: 175000
Click-out Link: My Click Out Link
Target URL: http://www.clickout.com
Link URL: http://stat.onestat.com/asp/link.aspx?sid=175000&linkid=1

Whenever you put the Link URL in your website and a visitor clicks on the hyperlink, OneStat counts a click-out on that specific link. In the example above the visitor is redirected to http://www.clickout.com.

In some situations you need a dynamic link URL. A dynamic link URL is an URL that is extended in runtime by a server side script (i.e. ASP, PHP, JSP or CGI). Examples are: passing account information or passing product and price information.

If you add the extra parameters to the Link URL the contents of these extra parameters are added to the Target URL. I.e. in our example if we add the value "myparam=123" to the Link URL.

The new Link URL is:

http://stat.onestat.com/asp/link.aspx?sid=175000&linkid=1&myparam=123

If the visitor clicks on the hyperlink he is redirected to:

http://www.clickout.com?myparam=123

The following is an example of passing multiple parameters to a Link URL:

param1=one¶m2=two

The new link URL is:

http://stat.onestat.com/asp/link.aspx?sid=175000&linkid=1¶m1=one¶m2=two

If the visitor clicks on the hyperlink he is redirected to:

http://www.clickout.com?param1=one¶m2=two