1. Home
  2. Docs
  3. AFL UTM Tracker Documentation
  4. Misc / Issues
  5. WP Engine Issues

WP Engine Issues

Depending on your WP Engine hosting plan, it may have one of the following issues:

  1. UTM parameters are stripped out

1. UTM parameters are stripped out

Do note that NOT all of the WP Engine customers suffer from this issue.

Based on a WP Engine article “Cache and utm/gclid“, it mentions that their system will sanitize the URL whenever it detects a tracking parameter. This is part of their caching algorithm to maintain performance vs cost.

In the article, it also mentioned in bold that:

In WP Engine’s cache configuration, we have specific measures in place to ensure that adding URL variables does not cause the page to serve uncached. We call this process “sanitizing”: A request is received by the server and the utm_ or gclid variables are stripped from the end of the URL before sending the request to be generated by PHP. Once the request is compiled, the variables are re-attached to the URL to be returned to the user.

However this wasn’t the case, the UTM parameters are not being re-attached to the URL. Instead the WP Engine server did a browser redirect.

The visitor visited the following URL:

https://www.examples.com/landing-page/?utm_source=google&utm_medium=cpc

Then the visitor is automatically redirected to the requested page without the UTM parameters by the WP Engine server. In this scenario, even Google Analytics will not receive the UTM parameters.

https://www.examples.com/landing-page/

Solution

The solution is to add the UTM parameters to the Cache-exclude setting in the WP Engine panel.

  1. Go to your WP Engine admin panel.
  2. Go to your site.
  3. Go to Advanced > Cache-exclude: query arguments
  4. Create the following entries:
    • utm_source=
    • utm_medium=
    • utm_campaign=
    • utm_term=
    • utm_content=
Screenshot of the WP Engine Cache-exclude setting
Screenshot of the WP Engine Cache-exclude setting