Title: Inline JavaScript file strings trigger CDN replacement
Last modified: March 8, 2017

---

# Inline JavaScript file strings trigger CDN replacement

 *  Resolved [elvenspellmaker](https://wordpress.org/support/users/elvenspellmaker/)
 * (@elvenspellmaker)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-javascript-file-strings-trigger-cdn-replacement/)
 * Hi there,
 * We have an inline minified script that has a section like the following:
    `e.
   src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.
   com/analytics.js/v1/"+t+"/analytics.min.js";`
 * If we enable relative paths redirect then we get the following:
    `e.src=("https:"
   ===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.
   js/v1/"+t+"https://subdomain.oursite.com/analytics.min.js";`
 * Our settings look like the following:
 * URL: `https://subdomain.oursite.com`
    Include: `wp-content,wp-includes` Exclusions:`.
   php` Relative Path: Ticked Https: Ticked
 * I would assume that with relative paths on it’d still only capture things which
   had the includes before it?
 * Thanks
    -  This topic was modified 9 years, 3 months ago by [elvenspellmaker](https://wordpress.org/support/users/elvenspellmaker/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [codyarsenault](https://wordpress.org/support/users/codyarsenault/)
 * (@codyarsenault)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-javascript-file-strings-trigger-cdn-replacement/#post-8893727)
 * Can you try putting that file inside its own folder (e.g. analytics/analytics.
   min.js) and then add “analytics” to your list of exclusions.
 *  Thread Starter [elvenspellmaker](https://wordpress.org/support/users/elvenspellmaker/)
 * (@elvenspellmaker)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/inline-javascript-file-strings-trigger-cdn-replacement/#post-8893730)
 * As this is an external link I cannot affect where this URL is coming from, it’s
   a script that seems to get an external link, we have no control over `cdn.segment.
   com`.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Inline JavaScript file strings trigger CDN replacement’ is closed to 
new replies.

 * ![](https://ps.w.org/cdn-enabler/assets/icon-256x256.png?rev=2472538)
 * [CDN Enabler](https://wordpress.org/plugins/cdn-enabler/)
 * [Support Threads](https://wordpress.org/support/plugin/cdn-enabler/)
 * [Active Topics](https://wordpress.org/support/plugin/cdn-enabler/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cdn-enabler/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cdn-enabler/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [elvenspellmaker](https://wordpress.org/support/users/elvenspellmaker/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/inline-javascript-file-strings-trigger-cdn-replacement/#post-8893730)
 * Status: resolved