• Resolved titsmaker

    (@titsmaker)


    I am not sure if this falls under “I have another file I want to host locally. Could you make a plugin?” category, but when you enable enchanced ecommerce tracking another js file (ec.js) is added to analytics.js and it is being loaded from Google.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi @titsmaker,

    Have you tried enabling Stealth Mode and updating analytics.js again? This’ll trigger ec.js to also be locally hosted. ??

    Thread Starter titsmaker

    (@titsmaker)

    Thanks, that worked. But now I am getting 2 requests for ec.js, first of them with 302 status and second successfull. First request adds rather significant time to page loading time.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Yes, I’m afraid there’s no other way around this. Here’s how it works:

    The analytics.js contains the requests to ec.js. Stealth mode rewrites these requests to a local endpoint. But this endpoint is the same for all Google Analytics-related requests — this is due to the structure of analytics.js, i.e. something I can’t influence.

    This endpoint captures the request to ec.js and redirects it to the locally hosted file.

    Thread Starter titsmaker

    (@titsmaker)

    Thank you for clarification!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ec.js support’ is closed to new replies.