1. Home
  2. Docs
  3. Integration & Setup
  4. Tracking Code & SDKs
  5. Tracking Code Integration
  6. Onsite Campaigns

Onsite Campaigns

Tracking Internal Search and Other Onsite Campaigns

Onsite campaigns are used to measure the success of internal linking. This allows analysis of the extent to which certain website functions lead to

  • product pages called up,
  • items are placed in the shopping cart or on the watch list,
  • orders are placed, thus generating sales.

Typical website functions that can be measured using onsite campaigns are:

  • internal search
  • internal banners and teasers
  • product recommendations.

Requirements:

  • To be able to record onsite campaigns, you need an etracker Analytics Pro or Enterprise Edition.
  • Orders must be recorded so that the success of clicks can be measured.
  • If the success of onsite campaigns is to be evaluated according to articles and product categories or eCommerce event steps (product pages viewed, added to shopping cart, ordered), etracker eCommerce tracking is required.

Good to know:

Onsite campaigns run separately from offsite campaigns – i.e. external campaigns and links (referrer origin). This means that internal searches or clicks on internal banners have no influence on the measurement of newsletter links or Google Ads campaigns.

In addition, the “everyone gets everything” attribution model applies to onsite campaigns. This means that an order is attributed 100% to each of the campaigns involved, regardless of the number of contacts or their order.

Example: A website visitor clicks on a home page banner, then uses internal search and clicks on a recommendation in the shopping cart, all of which are measured as respective onsite campaigns. The visitor then completes an order worth 500 euros. In the evaluation, all three onsite campaigns are each assigned an order and a turnover of 500 euros. The revenue is therefore not divided between the campaigns, as otherwise, for example, the recommendation in the shopping cart would reduce the success of the start page banner.

How it works

To ensure complete separation between external and internal campaigns, custom specific parameters are available for onsite campaigns. The implementation and evaluation differ between the analysis of internal search and other onsite campaigns:

  1. Track internal search.
  2. Track other onsite campaigns.

1. Track internal search

If you have integrated the etracker code via a plugin, the internal search is usually tracked automatically and does not need to be set up separately.

If you have integrated the etracker Code manually, the setup of the measurement is done quickly thanks to automatic capture if the search results pages contain a search parameter. To find out which search parameter is used to trigger your internal search, simply perform a search on your website and look directly at the URL:

On-site campaigns should not influence off-site campaigns, that is, the evaluation of the success according to the campaign or referrer origin. To guarantee this, you should create your own attribute set for the on-site campaigns. The following previously created attributes are required as standard (mandatory attributes).

In this case the parameter is “sSearch”. The parameters “q”, “s”, “search”, “query”, “term” and “keyword” are also frequently used.

To set up tracking, go to Settings → Account → Automatic tracking. To enable it, click the box in front of Enable automatic tracking of internal searches and enter the appropriate search parameter – in the example above, “sSearch” (without quotes!). Then click on Save changes to apply the settings. Done!

If the automatic measurement is not possible or the number of matches should be recorded, there is fortunately also the option of manual integration or transfer with the etracker code on the respective search results pages.

The first step is to enter the name of the search in the account settings under Settings → Account → Automatic entry → Internal search. To do this, enter the desired name, such as Internal search. Then click on Add and then on Save changes.

The search information is passed to etracker with the cc_attributes parameter in the parameter block of the etracker code on the search results page as follows:

Generic code:

cc_attributes["etcc_cu"] = "onsite";
cc_attributes["etcc_med_onsite"] = "Internal search"; 
cc_attributes["etcc_cmp_onsite"] = "#Placeholder search result#"; 
cc_attributes["etcc_st_onsite"] = "#Placeholder search therm#"; 

Code for search phrase ‘School’ (no result):

cc_attributes["etcc_cu"] = "onsite";
cc_attributes["etcc_med_onsite"] = "Internal search"; 
cc_attributes["etcc_cmp_onsite"] = "without result"; 
cc_attributes["etcc_st_onsite"] = "School";

Code for search phrase ‘Terminal 1’ (with result):

cc_attributes["etcc_cu"] = "onsite";
cc_attributes["etcc_med_onsite"] = "Internal search"; 
cc_attributes["etcc_cmp_onsite"] = "with result"; 
cc_attributes["etcc_st_onsite"] = "Terminal 1";

Alternative code for the transfer (search term ‘Book’, search successful)

var cc_attributes = { 'etcc_med_onsite': 'Internal search', 'etcc_cmp_onsite': 'with result', 'etcc_cu': 'onsite', 'etcc_st_onsite': 'book' };

Here, the attribute value for the medium in the code must match the name for Onsite Medium (etcc_med_onsite=) stored in the settings. The onsite campaign names can be assigned arbitrarily. Often, the etcc_cmp_onsite attribute is used to pass the number of matches.

2. Track other onsite campaigns

To measure the success of other website functions besides the internal search, you can attach appropriate onsite campaign parameters to the corresponding internal links. The easiest way to create the corresponding links is to use the Onsite Campaign Link Generator. To do this, click on the magic wand in the Marketing Reports menu to the right of the Campaign entry.

In the Link Generator, switch to the Onsite Campaigns Link Generator tab, where you can enter the target URL and the onsite campaign and medium names. Then click on Generate link to get the complete link. Then you can copy it to the clipboard and save it in the link list.

The type of website function can be transferred via the onsite medium (etcc_med_onsite) and the name of the function or the advertised product can be transferred with the designation of the onsite campaign (etcc_cmp_onsite).

The data of the onsite campaign can also be passed in the etracker code if not linked to a new page.

Example of transfer via script:

cc_attributes["etcc_cu"] = "onsite";
cc_attributes["etcc_med_onsite"] = "Onsite contest";
cc_attributes["etcc_cmp_onsite"] = "contest ABC";

The script must be set within the parameter block in the etracker tracking code, i.e. between

<!-- etracker tracklet 5.0 -->
<script type="text/javascript">

and

<script id="_etLoader" type="text/javascript" charset="UTF-8" data-block-cookies="true" data-secure-code="XXXXXX" src="//code.etracker.com/code/e.js" async></script>
<!-- etracker tracklet 5.0 end -->

XXXXXX stands for the individual account key.