Skip to content
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
Closed

Magento 2.2 Encoding Issue -> Google Analytics #13350

danielpfarmer opened this issue Jan 24, 2018 · 6 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@danielpfarmer
Copy link
Contributor

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.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Jan 24, 2018
@ihor-sviziev
Copy link
Contributor

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

@thangtd
Copy link

thangtd commented Feb 21, 2018

#MALU18

@thangtd thangtd self-assigned this Feb 21, 2018
@danielpfarmer
Copy link
Contributor Author

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
Copy link

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 mentioned this issue Feb 26, 2018
4 tasks
@magento-engcom-team
Copy link
Contributor

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 magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Feb 28, 2018
@magento-engcom-team
Copy link
Contributor

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.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

5 participants