Google Analytics Site Search Tracking on Mobile Site - mobile

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.

Related

Screen view count always zero with Google analytics and SPA analytics

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

Is it possible to make Google show the normal page in the search results instead of the mobile page?

We have a separate mobile site and a separate desktop site. There's basically a "mobile" page for each normal page like this:
public_html/home.php
public_html/m/home.php
And the m/home.php is showing up in the search results. Is it possible to make google show the normal home.php instead?
Responsive design is a good solution, but that's not the answer I am looking for at the moment.
And I don't want to 301 redirect m/home.php because people on mobile still need to view it.
Is my only option to redirect the user to home.php from m/home.php when I detect that they are not using a mobile browser?
My advice put noindex meta on your all mobile pages that's help you to prevent mobile pages getting result on Google serp then add mobile detection script on your normal site set and redirct for mobile users.

Sub domain mapping to a page

I'm creating an HTML page (GWT Module) for mobile browsers, It's currently on "www.mydomain.com/Mobile.html".
How can I map this sub domain "m.mydomain.com" on App-Engine to view this page and keep the address bar showing "m.mydomain.com"?
i would suggest to have responsive site instead of creating separate subdomain for mobile.
if you insist follow the link, it might help you
https://cloud.google.com/appengine/docs/domain#more_about_wildcard_subdomain_mapping
alternatively you could write js code to redirect user based on resolution of device
<script type=”text/javascript”>
if (screen.width <= 699) {
document.location = "http://example.com/Mobile.html"
}
</script>
I couldn't find a way to do this properly from GAE, So As a workaround I created a "URL Frame" also known as "Frame Redirect" or "URL masking" from my domain registrar to mask my html page with the sub-domain wanted.
So far, I don't see any problems with this.

Drupal site in Google search results

I have setup a personal Drupal v.7 freelancer site which doesn't display in Google search results when searching based on home page title or other main keywords. It's home page title is "Professional X-Cart services".
The site is http://www.craftforweb.com and if you for example, do a Google search, using the text "X-Cart services" or "X-Cart" in Google, it won't be displayed even in the first 20 result pages. On the other hand, in Yahoo, it gets displayed on the first page and in Bing, it gets displayed in the 2nd search result page.
The site is displayed on Google search results only if you use it's domain name as search string (and maybe some other string, which I am not aware currently).
The site has been on for almost 5 months now.
I have used metatags for the site pages, also have installed "Pathauto", "Page Title" modules and have enabled clean URL's.
I appreciate any help on this.
For better on-site optimisation, you can install the SEO Checklist module and implement best practice. Another advice not related with programing is to get backlink from your customer web site.

how to make google web page tree view in google search?

I'm looking for a code that Google or yahoo or bing or ... will automatically show web page tree view.
tree view of website it depends on sitemap, so, how can we set that Google will show website tree in Google search result, something like contact us page and other pages will appear in down of domain name that user will be able to click on those tree view links.
I really appropriate for your posts and comments about this issue.
Regards
It's not totally up to you, Google will decide when and if they are going to show that and it's only for the top result. You should add your site to Webmasters Tools and you can read more about Sitelinks.

Resources