SDKBOX 1.0.1 released with Google Analytics, support for Cocos2d-x v2, improved docs

I have installed the 1.1.1 version of SDKBox Google Analytics on iOS. It seems to compile and run without problems.

I get confirmation that Google Analytics has initiated.

(I get this in the console)
/SDKBOXGoogleAnalytics iOS.app/sdkbox_config.jsonINF: Init GoogleAnalytics plugin

I have even edited the sdkbox_config.json file to match the Tracking ID i was provided by Google Analytics. I still dont see any data on Google Analytics website. Could any one please help with this.

I am developing on Cocos2d-x v3.6

Can you open a new thread for this issue?

Can you show your code where you log the event?

Also check the Real-Time section for your event.

Continuing the discussion from SDKBOX 1.0.1 released with Google Analytics, support for Cocos2d-x v2, improved docs:

In the AppDelegate::applicationDidFinishLaunching() before the return statement

sdkbox::PluginGoogleAnalytics::init();

In the HelloWorld::init() before the return statement

sdkbox::PluginGoogleAnalytics::logEvent(“CategoryTest”, “ActionTest”, “LabelTest”, 3);
sdkbox::PluginGoogleAnalytics::dispatchHits();

I did check the Real Time section, it didn’t update.

When did you create your app on the dashboard aka how long before checking real time, as we found it can take about 24 hours for real time analytics to work for Google Analytics.

Its been 24hrs now. I still haven’t seen any change in Google Analytics.

That is weird, do you have any analytics in the Audience section

No I don’t… I really dont know what is the problem. I could share the project, if you would like.

I created a new project and new Tracking Code and waited for another 24hrs. But doesnt seem to work. Please check the project link below. It would be a great help. (It is new project with just SDKBox Google Analytics in it)

Code added by me.

In the AppDelegate::applicationDidFinishLaunching() before the return statement
sdkbox::PluginGoogleAnalytics::init();

In the HelloWorld::init() before the return statement
sdkbox::PluginGoogleAnalytics::logEvent(“CategoryTest”, “ActionTest”, “LabelTest”, 3);
sdkbox::PluginGoogleAnalytics::dispatchHits();

I made a project the other day, but it is for v2.2.6, here

“I created a new project and new Tracking Code and waited for another 24hrs.”

While I was testing my integration, I knew I had succeeded when the real-time feature of Google Analytics said 1 person was using the app. Hopefully that’ll help not waiting to see if you have corrected your issue.

I went through your project and made few changes to mine. Instead of calling on HelloWorld::init() I made a button which would call these methods

sdkbox::PluginGoogleAnalytics::logEvent(“CategoryTest”, “ActionTest”, “LabelTest”, 3);
sdkbox::PluginGoogleAnalytics::dispatchHits();

When I press the button, my app crashes with these errors.

SDKBoxGoogleAnalytics iOS.app/sdkbox_config.jsonINF: Init GoogleAnalytics plugin
SDKBoxGoogleAnalytics iOS[4035:1568941] cocos2d: surface size: 1024x768
Button Pressed
SDKBoxGoogleAnalytics iOS[4035:1568941] -[GAITrackerImpl dispatch]: unrecognized selector sent to instance
SDKBoxGoogleAnalytics iOS[4035:1568941] *** Terminating app due to uncaught exception
‘NSInvalidArgumentException’, reason: '-[GAITrackerImpl dispatch]: unrecognized selector sent to instance
libc++abi.dylib: terminating with uncaught exception of type NSException

Thank you, I will keep in mind :smile:

are you calling sdkbox::PluginGoogleAnalytics::init()

Yes, I am calling it on In the AppDelegate::applicationDidFinishLaunching() before the return statement

I asked the engineer who wrote this code and he says that you might not have the GA library in your app?

Do you mean PluginGoogleAnalytics.framework, if so. It is already in the projects frameworks folder as well as i can see it in Link Binary with Libraries

Can you send me what you are doing and let me play with it?

Sure I could do that, here

Let me know if the link worked for you.

It isn’t working for me.

1 Like

Try this one… it is Dropbox link

here