Joe Paisley
Posts: 0
Joined: Thu Mar 14, 2013 8:41 pm

Mobile Analytics

Hello highly-praised Appery team!

I was looking into some mobile app analytics options.

At first I arrived at the Google Analytics SDK. Have you had much experience with this using the Appery platform? Could I ask for some assistance adding this utility to my app?

Any advice would be great. Thank you so much!

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Mobile Analytics

Please try below step:

Create_new-javascript
Call this javascript smth like "googleAnalitic"
Paste your code to this file:
pre
code
var _gaq = _gaq || [];
//Note "UA-17112306-1" - should be your value.
gaq.push(['setAccount', 'UA-17112306-1']);
gaq.push(['trackPageview']);
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
/code
/pre

Note: To check that google analytic was loaded and started successfully you can do following:

Open debug browser console and type "gaq". Run it. If you see "undefined" as result - googleAnalytics not loaded, and successfully loaded in other cases.
To test GA use next code:
pre
code
gaq.push(['trackEvent', 'name', "val"]);
/code
/pre
after this code you should see "net" tab request to the google with current event.

Joe Paisley
Posts: 0
Joined: Thu Mar 14, 2013 8:41 pm

Mobile Analytics

Hi Igor,

Would I have to follow these steps as well?

https://developers.google.com/analyti...

I haven't done step 2 or step 3 yet. Perhaps you could guide me?

I was mainly interested in tracking events (as shown here):

https://developers.google.com/analyti...

And social interactions (as shown here):

https://developers.google.com/analyti...

I'm not sure how the above applies to the process. Would I do that after I've done the above steps? Do you mean the debug browser console as in Chrome Developer Tools?

As always, thanks so much for your help.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Mobile Analytics

Hi Joe.

Yes, you will need to follow these steps (after you will get working google analitic in your application). How to check it you can found in message above.

Please specify what problems you have with steps?

https://developers.google.com/analyti...

https://developers.google.com/analyti...

These links refer to android native code application. You don't need to use it with Appery.io.

Do you mean the debug browser console as in Chrome Developer Tools?

For event tracking you should use the following code:

pre
gaq.push(['trackEvent', 'Videos', 'Play', 'Huckleberry Finn']);/pre

Read more here: https://developers.google.com/analyti...

Note: this code can be used after you have google analitics stytem working in your applicaiton.

Return to “Issues”