Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-3618

Encoding issues with dataLayer values (gCampaign and gBasket)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Should have Should have
    • 1.59
    •  

    • Analytics

      Problem:

      There's a problem with the encoding of symbols (e.g "&") of the dataLayer values for Campaign (gCampaign) and Basket (gBasket) names. These values are defined in the pages and campaign pages backend. 

      For example:  "Meet & Dairy" is being sent via dataLayer as Meet & amp; Dairy
      Check the Netherlands page

       

      Why is this important?
      Data is entering with different values from the standards that were priorly defined (and that are already been used by the NROs in other websites) 

      Desired behaviour:

      Special characters and symbols (e.g "&") should be sent via dataLayer as they are seen on the backend.

       

      Additional comments:
      According to Ibrahim "the symbols are converted to the HTML name - it should be retained strings". I also tested other Petition Pages to check if this was a problem from Google Analytics, but there are other cases in which the dataLayer variables are added manually to the <head> and the values are sent correctly... So I imagine that this is a problem with the Planet 4 encoding of such values. 

       

      This is related to the ticket ---PLANET-3396--- and ---PLANET-3324---

        1. bug_encoding_values.png
          bug_encoding_values.png
          564 kB
        2. bug_enconding_ga.png
          bug_enconding_ga.png
          107 kB
        3. dataLayer_bug_encoding.jpg
          dataLayer_bug_encoding.jpg
          547 kB
        4. dataLayer_working_example.jpg
          dataLayer_working_example.jpg
          355 kB

            sdeshmuk Sagar Deshmukh
            jmarubay Julia Marubayashi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: