cordova-plugin-tag-manager icon indicating copy to clipboard operation
cordova-plugin-tag-manager copied to clipboard

Unable to install plugin

Open sashibrai opened this issue 8 years ago • 2 comments

Hi,

I have installed the plugin as suggested here https://github.com/kraihn/cordova-plugin-tag-manager

Below is my code

config.xml <plugin name="com.jareddickson.cordova.tag-manager" spec="https://github.com/kraihn/cordova-plugin-tag-manager" />

Code to initiate GTM `onDeviceReady: function() { var tagManager = cordova.require('com.jareddickson.cordova.tag-manager.TagManager'); var trackingId = 'GTM-XXXXXX(application GTM Id)'; var intervalPeriod = 30; var successGtm = function() { alert("5"); }; var errorGtm = function() { alert("6"); }; var errorDisGtm = function() { alert("7"); };

        // Initialize Tag Manager
        tagManager.init(successGtm, errorGtm, trackingId, intervalPeriod);
        tagManager.trackEvent(successGtm, errorGtm, 'Init', 'Any-Event', 'Any-Event', 1);
        tagManager.dispatch(successGtm,errorDisGtm);
		if (navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) {
			hzm.shared.onDeviceReady(hzm.hubView.afterContentLoad);
		} else {
			hzm.shared.onDeviceReady();
			setTimeout(hzm.hubView.afterContentLoad, 0); //this is the browser
		}
		hzm.events.onDeviceReady();
		setInterval(hzm.shared.keepAlive, hzm.constants.TIME.KEEP_ALIVE);
		hzm.vc.resetValues();
	}`

When I run the application in xCode getting the following error: screen shot 2016-12-09 at 3 40 59 pm

I have also noticed that xCode Plugins folder doesn't have the CDVTagManager.m file inside it.

Please suggest and advise, it's a bit urgent. Thanks in advance.

Getting the following error after adding the CDVTagManager.m file manually screen shot 2016-12-09 at 5 18 24 pm

sashibrai avatar Dec 09 '16 10:12 sashibrai

Hi,

Can someone please advise and suggest?

Regards!

sashibrai avatar Dec 13 '16 13:12 sashibrai

@sashibrai, please see issue #38

kraihn avatar Feb 09 '17 23:02 kraihn