New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2.2 Encoding Issue -> Google Analytics #13350

Closed
danielpfarmer opened this Issue Jan 24, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@danielpfarmer
Copy link

danielpfarmer commented Jan 24, 2018

With the Magento 2.2 update we are now seeing incorrect data in Google Analytics.

Steps to reproduce

  1. Complete a sale on Magento 2.2
  2. View Sale in Google Analytics
  3. Observe the Product Titles are incorrect

Expected result

  1. The product titles are transferred from Magento correctly

Actual result

  1. The product titles are incorrect

image

Potential Fix

This has been introduced in Magento 2.2 with changes to the Magento\Framework\Escaper

In the file Magento\GoogleAnalytics\Block\Ga

Replace all instances of

escapeJs

with

escapeJsQuote

After making this change the data coming into GA is now correct for our store.

@ihor-sviziev

This comment has been minimized.

Copy link
Contributor

ihor-sviziev commented Feb 12, 2018

@danielpfarmer if you have fix for this issue - could you create Pull Request with the fix?

@thangtd

This comment has been minimized.

Copy link

thangtd commented Feb 21, 2018

#MALU18

@thangtd thangtd self-assigned this Feb 21, 2018

@danielpfarmer

This comment has been minimized.

Copy link

danielpfarmer commented Feb 22, 2018

I believe this is part of a bigger encoding issue with Magento 2.2. I'm not sure what the motivations were to changing this in this release, but it is also effecting the opengraph data:

image

@ArjenMiedema

This comment has been minimized.

Copy link
Contributor

ArjenMiedema commented Feb 23, 2018

Keep in mind that if you change it back you do encode quotes. In Magento 2.1 it was an issue that when you entered a name containing double quotes, you got a JavaScript error for the staticImpressions (Google Tag Manager).

@julienanquetil julienanquetil referenced this issue Feb 26, 2018

Merged

Fix issue 13827 #13844

0 of 4 tasks complete
@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

magento-engcom-team commented Feb 28, 2018

Hi @danielpfarmer. Thank you for your report.
The issue has been fixed in #13844 by @julienanquetil in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.4 release.

@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

magento-engcom-team commented Mar 10, 2018

Hi @danielpfarmer. Thank you for your report.
The issue has been fixed in #13907 by @julienanquetil in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment