When users click links on pages on your website, you can collect related information in Adobe Analytics. For example, use link tracking to learn how users interact with your website, to track file downloads, and to track outbound links.
Configure link tracking for an Adobe Analytics framework
UseNavigation, go throughMission,Cloud-ServicestoAdobe AnalyticsSection.
Useshow settings, open the required Adobe Analytics framework.
Expand thatLink Tracking Preferencesand configure as needed (this page has more details):
File Download Tracking
Configure the Adobe Analytics framework to automatically track files downloaded from partner sites as downloads in Adobe Analytics. If you enable download tracking, only the file types you specify will be tracked.
Downloads of the following file types are tracked by default:
- exe
- zipper
- Then
- mp3
- Mover
- miles per gallon
- avi
- WMV
- While
- XLS
For example, if PDF file download tracking is enabled, whenever users click links to PDF files, the PDF download is tracked.
The framework's download tracking properties are implemented as code inanalysis.sitecatalyst.js
File generated for a page. The following code example represents the default download tracking configuration:
s.trackDownloadLinks= true;s.linkDownloadFileTypes= 'exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls';
To enable download tracking for your Adobe Analytics framework:
- Open the Adobe Analytics framework and expand the Link tracking settings section.
- AllowDownload tracking.
- insideDownload file typesIn the box, type the filename extensions for the file types that you want to crawl.
Externes Link-Tracking
You can track clicks on external links (exit links) on your pages.
To track external links for your Adobe Analytics framework:
- Open the Adobe Analytics framework and expand the Link tracking settings section.
- Set the following properties according to your needs.
Properties to track when external links are clicked:
External Monitoring
Enable external link tracking.External filters
(Optional) Define filters to match external URLs with link targets. If the link targets match the filter, the link will be followed. External filters are useful for tracking just some of the external links on your pages.To specify external links to track, enter all or part of the URL of the link target. Separate multiple filters with a comma. Enclose string literals in single quotes. No value (the default value of
''
, two single quotes) causes all external links to be included.Internal Filter
Define filters to match URLs from internal links. If the link points to URLs that match this filter, the link will not be followed. The default is a javascript command that returns the hostname of the URL for the address of the current window.To specify internal links that aren't crawled, enter all or part of the internal URL of the link target. Separate multiple filters with a comma. Enclose string literals in single quotes.
The default is
'javascript:,'+window.location.hostname
Leave the query string
Includes URL parameters when evaluating internal and external filter matches.(Video) 9. How to install Adobe Analytics Launch Extension and do Link tracking.Enable this option to include URL parameters when evaluating link destination URLs with external and internal filters.
External link tracking properties are implemented as code inanalysis.sitecatalyst.js
File generated for a page. The following sample code is generated for a page linked to a framework that has external link tracking enabled with the following settings:
- The external filter is
"google.com"
- The internal filter is the default of
'javascript:,'+window.location.hostname
- Query strings are not taken into account when evaluating the link target with filters.
s.trackExternalLinks= false;s.linkExternalFilters= 'google.com';s.linkInternalFilters= 'javascript:,'+window.location.hostname;s.linkLeaveQueryString= false;
Send variable data with link clicks
You can configure AEM to send variable data and events to Adobe Analytics when a user clicks a link. HeLink Tracking PreferencesProperties allow you to specify Adobe Analytics events and variables to track when link clicks occur.
The frame assignments determine the event and the values of the variables. You can assign Adobe Analytics variables to your content component variables that store the data you want to track when links are clicked.
To send variable data with link clicks:
- Open the Adobe Analytics framework and expand the Link tracking settings section.
- Set the following properties according to your needs.
Properties for sending variable data on link clicks:
Link-Event-Tracking
Enter the Adobe Analytics event variables that you want to use to count link clicks.Separate multiple variable names with a comma.
The default value of
none
does not cause trace events.Link Track Variables
Enter the Adobe Analytics variables that you want to send to Adobe Analytics when links are clicked. Separate multiple variable names with a comma.The default value of
none
causes variable data not to be sent.
When you specify the events and variables to send, the configuration is implemented as code inanalysis.sitecatalyst.js
File generated for a page. The following sample code is generated for a page when the framework browses iteventto10
event and theprop4
Property:
s.linkTrackEvents= 'evento10';s.linkTrackVars= 'prop4';
Example of a link tracking configuration
Complete the following procedures to examine the link tracking behavior of the Adobe Analytics integration. The procedures show results ofAdobe Experience Cloud-Debugger.
General configuration
This example illustrates how the mapping works in the context of tracing and the debugger:
Open the frame associated with a web page.
pull thatbook pagecomponent in the frame allocation area. Hebook pagecomponent is one of theGenerallyComponent group in sidekick.
USE
The component that you should use in a real-world scenario depends on the legacy component (if any).
(Video) Create Adobe Analytics Tracking URL Links in SecondsIf not, you should make your own component available there (by defining an Analysis subnode in your page component).
Configure the mapping according to the table below by dragging the Analytics variable (SiteCatalyst) from the left side panel:
variable CQ | Entry in the variable browser | Adobe-Parsing-Variable |
---|---|---|
Page Data.Title | Custom eVar 1 (eVar1) | eVar1 |
eventdata.events.pageView | Custom 1 (Event1) | event 1 |
- Drag the Find component into the frame allocation area. The search component belongs to the general component group in the sidekick. Configure the mapping according to the table below by dragging the Analytics variable (SiteCatalyst) from the left side panel:
variable CQ | Entry in the variable browser | Adobe-Parsing-Variable |
---|---|---|
eventdata.keyword | eVar 2 custom (eVar2) | eVar2 |
eventdata.results | Custom eVar 3 (eVar3) | eVar3 |
eventdata.events.search | Custom 2 (Event2) | event2 |
Set up external link tracking
In your framework, extend theLink Tracking PreferencesArea.
DeselectDownload tracking.
ChooseExternal Monitoring.
DeselectLeave the query string.
Use the following value for theExternal filtersList to identify it as an external URL:
'yahoo.com'
Add the following valueLink-Event-TrackingCampsite:
Event to1, event to2
Add the following valueLink-Variablen-TrackingCampsite:
eVar1, eVar2
Add a to the side associated with the frameTextComponent. WithinTextcomponent, add a hyperlink pointing to the following address:
https://search.yahoo.com/?p=esto
Switch topreview modeand click on the link.
The call made looks like this when viewed with the Adobe Marketing Cloud debugger:
USE
The URL does not contain the query string:?p=dies
Include the URL parameter
- In the frame, expand theLink Tracking PreferencesArea.
- AllowLeave the query string.
- Reload the page preview and click the link.
The call details displayed in Adobe Marketing Cloud Debugger resemble the following example:
USE
This time the URL contains the query string:?p=dies
Ad-hoc-Link-Tracking
Ad hoc link tracking allows content authors to set up link tracking for a component. The component configuration overwrites theLink Tracking Preferencesof the frame, i.e. on pages that are assigned to the frameTextComponents can be configured to track URL links.
With ad hoc link tracking, you can track download links, external links, and event and variable data.
To enable ad hoc link tracking, you need to do the following:
- Link the page containing the text component to the frame.
- Configure the Adobe Analytics framework to enable ad hoc link tracking.
- Configure link tracking for a text component.
Enable ad hoc link tracking
Configure your Adobe Analytics framework to enable ad hoc link tracking.
Open the Adobe Analytics Framework and expand theLink Tracking PreferencesSection.
AllowAd-hoc-Link-Tracking.
USE
Not all user types have access to this checkbox. Contact your site administrator if you need access.
USE
XSS antisamy settings are now SLING in the path/libs/sling/xss.config.xmland the following rules need to be added for ad hoc binding to work:
Extension of the anchor tag rule
<attribute name="onclick"> <list-literal> <value literal="CQ_Analytics.Sitecatalyst.customTrack(this)"/> </list-liter></attribute><attribute name="adhocenable"> <literal- list> <value literal="true"/> <value literal="false"/> </list-liter></attribute><attribute name="adhoce events"> <regexp-list> <regexp name=" irgendetwas " /> </regexp-list></attribute><attribute name="adhocevars"> <regexp-list> <regexp-name="anything"/> </regexp-list></attribute>
Configure link tracking for a text component
Before you can configure ad hoc link tracking forTextsame components, the following configurations must have been implemented beforehand:
- IsThe Adobe Analytics framework is configured to enable ad hoc link tracking.
- IsThe page containing the text component is linked to the frame.
Use the following procedure to set up link tracking for aTextComponents:
Open the page in edit mode and edit theTextComponents.
Select the text you want to use as hypertext and click the Hyperlink button.
(Video) 10. How to track Exit links in Adobe Analytics and custom script using doPlugin.Add the destination URL in the Link to field, and then expand the Link tracking section.
USE
Following custom links can appear as a separate action next to the link/unlink action (analytics icon).
It will only activate if you have selected a valid link in the RTE.
AllowCustom link trackingto override the Adobe Analytics framework link tracking settings and enable link tracking for the current link.
(Optional) To track link click events, add Adobe Analytics event names in theInclude Adobe Analytics variablesField. For example, separate multiple event names with commas
event1, event22
.(Optional) To track variable data when a link is clicked, add Adobe Analytics variables in theInclude Adobe Analytics variablesField. Use one of the following formats:
*<variable name>*: *<dynamic value>*
*<Variablenname>*: *'CONSTANT'*
The following examples illustrate each format:
eVar10:page data.title
prop1: 'Berenjena'
Separate multiple values with a comma.
ChooseOK.
Business.Adobe.com Resources
Automatic text summarypersonalized experiencesContent IntelligenceWeb Content Managementdigital wealth managementDigital Signature