Search code examples
cordovaionic-frameworkionic4google-tag-managerionic-native

Ionic 5 IOS cannot send data to Google Tag Manager


I've spent hard time to send data to gtm(Google Tag Manager) in ionic ios .

android and web are sending gtm very well. but ios dosen't working it.

My ionic version is 5.4.4. Cordova version is 9.0.0

<access origin="*" />
<allow-navigation href="*" />

I set them in config.xml

and install cordova-plugin-ionic-webview@4.1.2

I think something in ios prevent to request gtm. but I don't have idea to solve it.

already read this article https://www.multiminds.eu/blog/2016/12/06/google-analytics-and-tag-manager-with-ionic-and-cordova-apps/

I do that, not work for me.

please help me.


Solution

  • I solved it by switching from cookies storage to local storage. Follow the steps from this comment: https://github.com/ionic-team/capacitor/issues/1433#issuecomment-644086704