Overview
DNN's friendly URL rewriting feature turns all query strings into part of the base URL. By default, this includes things like tracking links.
For example:
Original URL: example.com?gclid=testuser1234
Converted URL: example.com/home/glcid/testuser1234
This may skew analytics data as this will be interpreted as a different page for Analytics services.
Solution
You can use the Keep in Querystring Regular Expression regex string to prevent URL rewriting from changing tracking query strings without modifying your existing URLs.
- Login as a portal administrator.
- Go to Settings > SEO > Url Management > Expressions
-
Append the specific query string to the Keep in Querystring Regular Expression text box.
For example:/nomo/\d+|/runningDefault/[^/]+|/popup/(?:true|false)|/(?:page|category|sort|tags)/[^/]+|tou/[^/]+|(/utm[^/]+/[^/]+)+|/gclid/|/fbclid/
Note: If you need assistance with the Regular Expression, a site such as https://regexr.com/ can help. - Click Save.
Testing
You can test that the query strings are not being rewritten by AUM by accessing the URL with the query strings. If a user visits the site with a tracking link (e.g. mysite.com/sales?glid=randomstring
), DNN should not rewrite this URL to mysite.com/sales/glid/randomstring
.
Comments
0 comments
Article is closed for comments.