Screen view count always zero with Google analytics and SPA analytics - angularjs

I implemented GA on my latest project. The web part of project is done using angularjs1 framework.
I have a strange issue. I have implemented GA on Android, iOS and web. The issue is that the screen views count for web is always showing zero. But I can see a number on total 553 and unique screen views 214. I am tracking screens via setting virtual page views
https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
Here is my code workouts
on my index.html
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
</script>
on my app.js run.inject
$window.ga('create', 'UA-my-tracker-id', 'auto');
On my controller
$window.ga('set', 'page', 'home-web');
$window.ga('send','pageview');
I am attaching my GA statistics screenshot

I am answering to my question since i found the solution and may be helpful to someone who faced the similar issues.
The reason was when i created the tracker account before two years back i set the "What would you like to track?" field to mobile app.
I created another tracker with type website.Now everything works fine.
Now I have two trackers.one for mobile app and one for web app.And one more thing i found that for mobile app google recommends fire base analytics
https://support.google.com/analytics/answer/2587087?hl=en

Related

AdSense and AngularJS application -- approval

My website is a Single Page Application written with AngularJs.
I am trying to add AdSense for some pages. After submitting, my site was rejected because of the following reason: "Insufficient Content".
My question here is: were adSense crawlers able to access and view my website considering that we use escaped_frangment and phantomJs to render the pages? (This works pretty fine for google bots.)
What can I doto make my website approved by adSense?
Thanks in advance.
I've used Prerender successfully in the past. It was a bit of a pain to set up, but works very nicely.
Search engines and social networks are always trying to crawl your
pages, but they only see the javascript tags...
We render your javascript in a browser, save the static HTML, and you
return that to the crawlers!

AngularJS application problems appearance in Google search

I have a personal project which consumes my free time and effort for about a year without significant profit. I have problems with it appearance in Google and would really appreciate to get help here.
This project (http://yuppi.com.ua - similar to craiglist in US) is WEB-based AngularJS 1.2 application that uses PHP rest API hosted on GoDaddy. And in order to make this application popular it have to be very visible in internet and very searchable in Google and users have to be able to share pages via social networks or skype.
According to Google specification, google crawlers doesn't run javascript to get content of a web page before index, so I've added _escaped_fragment_ page that displays content of web page without javascript. For example:
Page: http://yuppi.com.ua/#!/items/sub/18/_
Dirty : yuppi.com.ua/?_escaped_fragment_=/items/sub/18/_
This dirty page will be redirected here where google will see content.
http://yuppi.com.ua/server/crawler_proxy/routee.php?path=/items/sub/18/
So basically I have two versions on HTML file for that page. One version is the one that available to users, which has styles, a lot more HTML tags etc. And the second is the version for Google crawler - very light-weight without any styles. And I am expecting to see clean link to my site in Google, not dirty.
So, If to search all links to a web site in Google you will see that one of the links displays it's "dirty" state.
Another problem is sharing links in Skype.
When I send a link to someone, I am expecting that this link will be transformed to thumbnail image but it is not happens. Instead I see ungly link to my web site.
Please help me to understand how to make happy everyone: users, google crawler, GoDaddy and me.
I was encountering the same problems last year with a big project and we ended to use : https://prerender.io/.
It's a prerendering system that work with a phantomjs browser to detect bot request and render a full html template. It does also instanciate a cache service to not render again a template that haven't change.
Hope it help's.

Azure Mobile App and AngularJS responsive in same host space

Is it possible to get ride of "This mobile app is up and running" page and when user enters the sitename redirect/route him to sitename/app folder where I can pretty much create a AngularJS website in my project folder. FYI - I'm a Dev beginner
using Custom site URL in Azure: I tried this and working pretty like,
when I open the site (www.testsite.com) it's taking me to blue screen
when I go to (www.testsite.com/app) it displays my AngularJS app that I am trying deploy along with and in same mobile app serivce
REST API services and details under www.testsite.com/swagger
why I am trying this ?
On a typical note I want my app to serve all devices, web, mobile, tablet and I feel that mobile app solution is the only lean solution to do rapid application development but wondering how to reach web users without creating an other Web App services in Azure only for Views or web client which comes with cost. let us say if mobile service is just a backend stack and it doesn't allow it... I wonder why not ? by doing it, developers don't need to create 2 services in azure (1. mobile app, 2. web app)
Appreciate it.
found work around by adding MVC Razor Home controller and view for home landing page. more information in this link. this may be a temp solution to get ride of Blue screen and I am going to explore more in include AngularJS site and routing from angular too.
Since this solution works with only MVC style routing there will be a conflict between routing mechanics. will update as soon as I get something.
https://social.msdn.microsoft.com/Forums/azure/en-US/f23175db-2a83-489f-ac0c-f2abe9e48a76/default-document-for-the-mobile-app?forum=azuremobile
If Home view not showing up refer this link.
The view 'Index' or its master was not found

Google Maps in Cordova and ionic

Just started developing hybrid apps with the ionic framework, and ran into a little problem.
I am trying to embed a Google map, but can't wrap my head around a lille issue.
First, I downloaded and implemented the "Angular Google Maps" from
http://angular-ui.github.io/angular-google-maps/
Then I created a API key through the Google developer console.
Added my applications id, from the config.xml, to the allowed url's
Added the key as part of the config section:
uiGmapGoogleMapApiProvider.configure({
key: 'added the key here',
v: '3.20', //defaults to latest 3.X anyhow
libraries: 'weather,geometry,visualization'
});
Added uiGmapgoogle-maps as a module
Placed <ui-gmap-google-map center='map.center' zoom='map.zoom'></ui-gmap-google-map> where I wanted the map to be.
....and now the problem:
When I fire up the app in the Ripple emulator, the maps shows just fine, for a second, and then tells me that the page was unable to display a Google Maps element, and gives me an "InvalidKeyOrUnauthorizedURLMapError", but it is an periodic error, because somethimes it actually works, without throwing an error, but then I try it on a live device, and the screen is just blank.
It is pretty safe to say, that I forgot something, or doing something wrong, but thank you very much in advance.
[EDIT]Well, if I remove all the restrictions for the Google Maps API, it works in the Ripple emulator, so I can change the question to: What url am I supposed to specify as allowed, when it is a cordova app?
And what causes the empty map when executed on a real device?[/EDIT]

Google Analytics Site Search Tracking on Mobile Site

we are trying to track the search on one of our clients mobile site with google analytics site search tracking function but it just doesn't work. We do this by pushing virtual page views. We adjusted the search terms in the tracking code and in the view settings (searchparamter: search). On the normal website the site search tracking works just fine but on the mobile site it just won't function right. Both sites are in one property and only use filters to include/exclude mobile/website traffic. In the reportings of the mobile site search there is only very few data and all of our test keywords were not tracked.
When searching on the mobile site, the URL is output as:
http://de.website.mobi/search.php?search=test
This is the code we use on the mobile site:
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-43881360-1');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview'
, { 'page': '/search.php?search=test' }
);
I'm really thankful for new ideas or general feedback! Thanks in advance!
You will need to:
Go to your google analytics admin panel
Go the view you want to track the site search under. Its the last column to the right
Click on "View Settings"
Click on "Site Search Settings" (bottom)
Turn it on
Type in search
Save it and it will work.

Resources