How does the source attribution work?
The source of a visit is unique and cannot be modified.
Organic sources are only defined on "page.display" events, while marketing sources can be defined on any type of event, and require feeding src_medium and src_campaign at least.
When a visitor arrives at your website, our SDK will check for marketing campaign parameters in the Query String of the URL. If there are some, they will be automatically added as event parameters into the event generated from this page, in addition to the natively collected parameters.
Once the event has been received by our servers, our processing chain will check that it is the beginning of a visit. If so, it will check whether marketing campaign parameters are available to define a marketing source. If no marketing campaign parameters are available, it will use the previous URL, automatically collected by the SDK, to define the natural source of the visit.
Organic sources
Organic sources are defined according to the domain of the URL preceding the arrival on your site. We thus define the source of visits according to whether or not a domain is available in our internal lists, specific to each type of source.
For example, the "http://facebook.com " domain is associated with the social networks list, so visits coming from this domain or one of its sub-domains will be assigned the "Social media" source.
Referrer sites
All sites whose domain is not present in any of our lists, which are then simply considered as referrer sites.
Portal sites
Sites whose URL is one of those you have entered for other sites belonging to your organization.
Social media
Social networks listed as such on our side (http://facebook.com , http://instagram.com , ...).
Search engine
Search engines listed as such on our side (http://google.com , http://bing.com , ...).
Webmails
Domains associated with mailboxes visited from a browser (mail.google.com, http://mail.yahoo.com , ...).
Direct traffic
All cases where no previous URL could be collected.
There are various reasons why no previous URL is available:
The visitor clicks on a bookmark that redirects to your site.
The visitor types your site's URL directly into the search bar.
The visitor clicks on a link that redirects to your site, but opens in a new tab.
The visitor clicks on a link within an email, but from a desktop application such as Outlook, resulting in the opening of their browser or a new tab.
The visitor stopped browsing your site for more than 30 minutes (the default inactivity time for a visit) without closing his tab, then resumed browsing. In this case, we're talking about direct traffic as "continuation of visit", since the URL preceding the first page load has the same domain.
Marketing sources
To define a marketing sources, it is mandatory to feed the src_medium ("Campaign - Type" and "Source") and src_campaign (Campaign - Name) properties. Also, a marketing source must be defined at the latest on the first "page.display" event, but can be set on any of the preceding events.
By default, our SDK will automatically detect any URL parameter prefixed with "at_" and transform it into an event parameter of the same name, prefixed with "src_", such as :
at_medium = src_medium
at_campaign = src_campaign
at_myproperty = src_myproperty
Depending on your settings, it is possible to define other prefixes for your URL parameters.
Under the consent exemption, parameters relating to marketing sources are not exempted from consent by default, in accordance with the guidelines of the supervisory authorities in the various countries. Your visitors will therefore systematically have an organic source. Only sites that have implemented the Hybrid Analytics can natively retrieve marketing sources, for visitors who have consented to tracking in a prior visit.
If you want to be able to retrieve some of your marketing sources, you'll need to set up Hybrid Analytics, as well as tagging to force the marketing source of a visit.
Force the marketing source of a visit
Forcing the marketing source of a visit is used to recover the marketing source for Hybrid Analytics, or to get closer to Google's attribution model to associate your visits with the last campaign met.
In the case of Hybrid Analytics, it is necessary to wait until the visitor consents to your cookie banner before collecting information that is not considered as strictly necessary. At this stage, the visitor has generated a visit, since an event is normally sent in "exempt" mode when the page is loaded, and this visit therefore generally has a source.
As suggested in our technical documentation, pushing the "src_force" parameter to true in the event generated when the accept button on your CMP is clicked will force the marketing source to be updated.
Our SDK will automatically retrieve the information contained in the URL's Query String if the visitor did not continue browsing before accepting your cookie banner, so all you have to do is to add the "src_force" parameter within the event. If, however, the visitor can navigate before making a choice on your CMP, you'll need to make your Query String persistent or to store the campaign information and push it into the event that will force the marketing source.
We usually recommend generating a click event or a custom event when the visitor accepts your CMP, to avoid distorting your bounce rate or the real number of page loads.