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

Fix ‘pageType’ dataLayer push

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Should have Should have
    • 1.53
    • 8
    • Campaigns
    • Sprint #86

      User stories

      • As a data analyst, I want to be able to categorize the different page types
      • As a data analyst, I want to use the same pageType standards for the Planet 4 websites

      Problem:

      The dataLayer values for ‘pageType’ must be fixed. The rule today is not complete, so we are getting a lot of blank or unknown values.

      Check a few screenshots (examples attached) on this ticket or the table below:

      Page Value
      Homepage Front page
      Post pages Post pages
      Tags <category related to the tag>
      Category Unknown page
      Post type pages <blank>
      Evergreen <blank>
      Other pages (e.g Act) Unknown page

       

      Suggestion:

      Define the ‘pageType’ value based on the wordpress structure (e.g tags, post types), the admin choices on the Planet 4 WP Settings (homepage, act, explore, issues) or the page template used (default, evergreen).

       

      Page Value Comment
      Homepage Homepage If not possible to categorize as Homepage, use ‘Default page’
      Act Act This is defined on the Planet 4 Admin Settings. If not possible to categorize as Act, use ‘Default page’
      Take Action Take Action This is defined by the child pages of the Act page. If not possible to categorize as Take Action, use ‘Default page’
      Explore Explore This is defined on the Planet 4 Admin Settings. If not possible to categorize as Explore, use ‘Default page’
      Category (Issue) Issue Page This is defined by the child pages of the Explore page. If not possible to categorize as Issue, use ‘Default page’
      Post pages Post Page  
      Tags Tag Page  
      Post type pages Post Type Page  
      Evergreen Evergreen Page  
      Pages Default Page  
      Campaign Campaign Page (CPP Project)

       

      Instructions:

      • Update the script that is defining the rules for the ‘pageType’ value
      • Insert the pagetype datalayer.push on all Planet 4 pages:

       

      dataLayer.push({

      'pageType' : '[value should be according to the rules above]',

      });

        1. pgetype_posttype.jpg
          pgetype_posttype.jpg
          306 kB
        2. pagetype_tag.jpg
          pagetype_tag.jpg
          631 kB
        3. pagetype_ta.jpg
          pagetype_ta.jpg
          626 kB
        4. pagetype_post.jpg
          pagetype_post.jpg
          340 kB
        5. pagetype_act.jpg
          pagetype_act.jpg
          643 kB

            atheodor Angelos Theodorakopoulos (Inactive)
            gabor.galgocz gabor.galgocz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: