Directory
  Navigation

AnalyticsURL Data Type

"Analytics URL" data types allow you to create fields, invisible to the user, that will record the site from which the user was referred to your website, the current page the user is located on within your website, and/or the first page that the user visited within your website.

Creating Analytics URL Data Types:

After entering an appropriate name for the data type and selecting "AnalyticsURL" from the "Type" drop-down menu and click "Save".

You will then be presented with a window like the one pictured below.

Specifying URL Type:

The first thing to do is specify what URL you would like to be recorded, by selecting the desired option from the "Match Against" drop-down menu.

If you would like to have the site from which the user came to your website recorded, select "Referrer." If you would like the URL of the page that the user is currently located on (the page that contains the form) to be recorded, select "Current Page." If you would like the system to record the first page that the user accessed on your website, select "Entry Page." Finally, if you would like both the referring page and the first page of your website accessed by the user to be recorded, select "Both Referrer and Entry Page" (in which case the two URL's will be listed, separated by a single space).

Patterns & Replacements:

Should you wish to make the recorded URL's more user-friendly and easy-to-read, getting rid of unnecessary variables and text so that it will be easier to identify the actual sites and pages when looking at the data in the future, you can make use of the "Pattern" and "Replacement" columns.

In the "Pattern" column, simply enter a particular pattern or form of a URL for the system to look for when recording the URLs.

Then, in the "Replacement" column, enter the more user-friendly, straightforward label that you would like to be stored instead of the lengthy URL when it matches the specified pattern.

For example, if you were to enter *google.*/*" in the "Pattern" column and "Google" in the "Replacement" column, every time that the referral URL has "google" as its domain name, the system will enter "Google" instead of the full, often convoluted, URL.

Should you wish to add additional patterns for the system to look for, simply click on the "Modify" button, and a new row will be added for you to fill in as you like.

When recording URL's, the system will go through the list of patterns from top to bottom. Once a pattern is met, the system will use the associated "Replacement" and will not try to match the URL to any of the other patterns appearing later in the list.

You can make sure this works by entering a URL into the "Test URL" field at the top of the window. To the right of the "Pattern" and "Replacement" columns, you can then see what the result would be if the test URL was matched up against the specified patterns.

As soon as you are done entering the desired patterns and replacements, and have confirmed that they work, simply click "Done" at the bottom of the window, and the "Analytics URL" data type will be added to the "Available Datatypes" list.

Examples:

DescriptionPatternReplacement
If the referer is a Google replace the URL with "Search Engine (Google)" *google.*/* Search Engine (Google)
If the referer is a Google then use the keywords (extract the variable "q" from the URL). *google.* ${q}
If the referer is a Google then write "Google:" followed by the "q" variable. *google.*&q=*&* Google: ${q}
If the referer is a Google then write "Google:" followed by the "q" variable.
Note that the "\3" is backreferencing to the 3rd asterisk in the pattern.
*google.*&q=*&* Google: \3
Advanced pattern using the Perl-compatible regular expression. /^http:\/\/(?:www\.)?google\.(cz|com|co\.uk)\/.*q=([^&]+).*$/i Google \1 (keywords: \2)

Note that the variable names are case-insensitive. ${q} is the same as ${Q}.


Please send us suggestions regarding this documentation page
If you would like to recommend improvements to this page, please leave a suggestion for the documentation team.

Be the first to write a comment...