Google Tag Manager package

There is a problem, where the default Google Tag Manager triggers, like clicks, don’t work. This will be solved once this Pull Request is merged.

1 Like

6 posts were split to a new topic: Problem with Google Tag Manager Package

We have already released the fix for this :tada: : Read the full Release Announcement .

1 Like

@SantosGuillamot @luisherranz

I am getting below error once I add to the packages in frontity.settings.js

TypeError: Cannot convert undefined or null to object
  at Function.keys (<anonymous>)
  at getKeys (webpack-internal:///./node_modules/deepmerge/dist/umd.js:2:1009)
  at mergeObject (webpack-internal:///./node_modules/deepmerge/dist/umd.js:2:1282)
  at deepmerge (webpack-internal:///./node_modules/deepmerge/dist/umd.js:2:2056)
  at state.frontity.packages.forEach.name (webpack-internal:///./node_modules/@frontity/core/src/utils/merge-packages.ts:8:484)
  at Array.forEach (<anonymous>)
  at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/core/src/utils/merge-packages.ts:8:226)
  at __webpack_exports__.default (webpack-internal:///./node_modules/@frontity/core/src/server/store.ts:5:271)
  at app.use (webpack-internal:///./node_modules/@frontity/core/src/server/index.tsx:61:68)
  at process._tickCallback (internal/process/next_tick.js:68:7)

is there any specific version required for any of the packages? Do any additional packages need to be installed to make this work?

Below are some core packages and it’s versions
@frontity/core : 1.9.0
@emotion/core : 10.0.35
@frontity/analytics : 1.4.0
@frontity/connect : 1.1.3
@frontity/google-tag-manager-analytics : 1.2.1

Yes, please update the Frontity packages to their latest version. You can follow this guide: Keep Frontity Updated - Frontity Docs

Thanks @luisherranz
After updating packages now it’s no longer showing any errors, but I am getting 404 pages on all the Pages and post URLs. only homepage is working

if I remove
"homepage": "/home",
from frontity.settings.js then all other page starts working but my home page does not show the page I want as home page, I have already set the same page as Home Page in wordpress settings.

I think this change is causing the issue - Fix pattern of `homepage` internal redirect · frontity/frontity@4f12c5e · GitHub

If I revert this change in the package then the home page and all other pages are working fine.

@david @SantosGuillamot , could you please take a look at this?

Sure, I will try to reproduce it. In the meantime, @parth.nextbits could you please share the content of your frontity.settings.js file? If you could also provide a repository with the code of your project, it will be really useful as well.

@SantosGuillamot

I am not allowed to disclose that details yet, so I can not share the repo as it’s private right now.

below is my frontity.settings.js file which is working after updating @frontity/wp-source to 1.11.2 version. but not working with the 1.11.3 version

const settings = {
  "name": "test",
  "state": {
    "frontity": {
      "url": "http://test.frontend.com/",
      "title": "Site Title",
      "description": "Meta Description"
    }
  },
  "packages": [
    {
      "name": "@frontity/mars-theme",
      "state": {
        "theme": {
          "menu": [
            [
              "Home",
              "/"
            ],
            [
              "Nature",
              "/category/nature/"
            ],
            [
              "Travel",
              "/category/travel/"
            ],
            [
              "Japan",
              "/tag/japan/"
            ],
            [
              "About Us",
              "/about-us/"
            ]
          ],
          "featured": {
            "showOnList": false,
            "showOnPost": false
          }
        }
      }
    },
    {
      "name": "@frontity/wp-source",
      "state": {
        "source": {
          "url": "https://admin.wordpress.com/",
          "homepage" : "/home",
          "postTypes": [
            {
              type: "video",
              endpoint: "video"
            },
            {
              type: "voice",
              endpoint: "voice"
            },
            {
              type: "our-stories",
              endpoint: "our-stories"
            },
            {
              type: "press-releases",
              endpoint: "press-releases"
            },
            {
              type: "in-the-news",
              endpoint: "in-the-news"
            },
            {
              type: "events-and-travel",
              endpoint: "events"
            },
            {
              type: "our-work",
              endpoint: "our-work"
            },
            {
              type: "disasters",
              endpoint: "disasters"
            }
          ],
          taxonomies: [

            {
              taxonomy: "our-collection",
              endpoint: "our-collection",
              postTypeEndpoint: "our-stories"
            },
            {
              taxonomy: "voice-collection",
              endpoint: "voice-collection",
              postTypeEndpoint: "voice"
            }
          ]
        }
      }
    },
    {
      name: "@frontity/google-tag-manager-analytics",
      state: {
        googleTagManagerAnalytics: {
          containerId: "GTM-TEST",
        },
      },
    },
    "@frontity/tiny-router",
    "@frontity/html2react",
    "@frontity/head-tags"
  ]
};

export default settings;

You’re totally right. I was able to reproduce the error and it seems it’s caused by the function you mentioned before. I have just opened an issue to talk about it and solve it → Frontity returns a 404 in all pages when state.source.homepage is defined · Issue #805 · frontity/frontity · GitHub

1 Like

Hi @parth.nextbits We have just made a release with this fix. Could you please update your project following this guide and check if your issue is solved? :slightly_smiling_face:

2 Likes

@SantosGuillamot
After updating to the latest version now working fine all the pages
Thanks for a quick fix.

3 Likes

2 posts were split to a new topic: Bounce rate drop