AFL UTM Tracker Documentation

  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. High number of admin-ajax.php requests
  2. UTM parameters are stripped out

1. High number of admin-ajax.php requests

If the WP Engine support team has emailed to you regarding a high number of admin-ajax.php request coming from our plugin, you can disable our Server-side Cookie Renewal (admin-ajax.php) feature.

The WP Engine hosting plans relies heavily on their caching system, so any extra PHP process is not advisable.

But take note that once our admin-ajax.php is disabled, you will not get an accurate attribution report for Apple devices because Apple has implemented Intelligent Tracking Prevention (ITP) in Safari. With ITP, it may limit the lifetime of client-side cookie to 24 hours. After 24 hours, the cookies will be deleted.

To bypass Apple’s ITP limit, our plugin uses admin-ajax.php to issue server-side HTTP cookies to every site visitor. Apple will not delete server-side cookies.

How to disable Server-side Cookie Renewal (admin-ajax.php)?

  1. Login to your WordPress Admin.
  2. Go to the AFL UTM Tracker > Settings > Site Performance section.
  3. Set the Server-side Cookie Renewal to ‘Fastest – Disable Feature’.
  4. Clear all page cache.

2. 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