cordova-plugin-tag-manager
cordova-plugin-tag-manager copied to clipboard
Unable to install plugin
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:
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
Hi,
Can someone please advise and suggest?
Regards!
@sashibrai, please see issue #38