Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install plugin #37

Open
sashibrai opened this issue Dec 9, 2016 · 2 comments
Open

Unable to install plugin #37

sashibrai opened this issue Dec 9, 2016 · 2 comments

Comments

@sashibrai
Copy link

sashibrai commented Dec 9, 2016

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
Copy link
Author

Hi,

Can someone please advise and suggest?

Regards!

@kraihn
Copy link
Owner

kraihn commented Feb 9, 2017

@sashibrai, please see issue #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants