redirect,google-analytics,seo , Google Analytics bounce rate

Google Analytics bounce rate


Tag: redirect,google-analytics,seo

I have a bounce rate of almost 90% on my site, I'm wondering if it has to do with my setup perhaps google doesn't like it?

My site contains multiple filters you can choose and I want them stacked nicely like this in the url: /banana/kitchen/workspace/ or /kitchen/banana/workspace/ or /workspace/kitchen/banana/ etc

So the users can select the filter in any order they want and I don't have to worry about making all links order the filters correctly.


RewriteEngine on
RewriteBase /

RewriteRule ^(.*)/$ redirs.php?data=$0 [QSA]

Could this make google think all these suburls are one and the same? In redirs.php I use include() to fetch the correct page based on what's inside the url.


Background info:

I was running into a situation where .htaccess was looking something like this before:


RewriteRule ^/banana/ banana.php
RewriteRule ^/banana/kitchen/ banana.php?location=kitchen
RewriteRule ^/kitchen/banana/ banana.php?location=kitchen
RewriteRule ^/banana/kitchen/ banana.php?location=kitchen
RewriteRule ^/kitchen/banana/orange banana.php?location=kitchen&orange
RewriteRule ^/orange/kitchen/banana/ banana.php?location=kitchen&orange
RewriteRule ^/banana/orange/kitchen/ banana.php?location=kitchen&orange


I use a canonical meta tags don't worry about duplicate content for these..


Analytics.js runs on the client, so all that matters is the final URL that appears in the browser. It's very unlikely that your issue has anything to do with your .htaccess file.

It's much more likely that your bounce rate is high for other reasons. I'd highly recommend reading this article on How Google Analytics calculates time. It will probably shed some light on your bounce rate issue.


Get Parameter from URL using PHP

I have a url: I am currently successfully passing the postback parameter using the PHP below. However, I can not figure out how to also pass the city parameter. <?php session_start(); if(isset($_SESSION['postback'])) { if($_GET['postback'] == "") { header ("Location: qualify-step2.php?postback=".$_SESSION['postback']); } } ?> Can someone please help me edit...

Redirect to a homepage cakephp 3

I've followed the articles tutorial from cakephp 3 website and created the website Now there is add article, delete article and edit article actions. When I delete an article it redirect me to http://localhost:8888/test/articles/delete/14 Here is the delete code. public function delete($id) { $this->request->allowMethod(['post', 'delete']); $article = $this->Articles->get($id); if...

Htaccess regex: exclude REQUEST_URI

I really tried everything, the tool htaccess tester says that it's ok, but it's not really working. I want to redirect a subdomain to the main domain only if the REQUEST_URI doesn't start with 3 specific strings. I tried without success with: RewriteCond %{HTTP_HOST} ^$ [NC] RewriteCond %{REQUEST_URI} !(aaa|bbb|ccc) RewriteCond...

PHP redirect page works only in localhost

I haven't found any solutions for my problem so I decided to ask. I would like to redirect my php script page after submitting a form, so I use header at the end of my codes! Interestingly, when I test it in my localhost, it works and redirects the page...

PHP - .htaccess and GET parameters

I am trying to create a simple redirect to another page on login script. Currently I am rewriting my URLS to the following format using .htaccess: RewriteRule ^login$ ?i=l [L] RewriteRule ^login([^/]*)$ ?i=l&=$1 The normal URL is therefore: - although I wish to be able to do the following:...

Regex for value less than X

I have a website which uses google analytics to collect event values (annual salaries). I want to see the average event value, but it is often skewed by people entering exceptionally large values. I want a regex which will filter out values above 5 million (5000000). Or, if it’s easier,...

How to include Google Analytics in my app

I am trying to include Google Analytics in my app, but after following Google's guide I ended up no where. For some reason I did not see any activity in my Google's Analytics account. So here I am, asking for a simple guide to follow. Please if anybody knows a...

python requests with redirection

Trying to authenticate on site, noticed that there were a redirect to Found that there were 302 POST with plain credentials in data form. Copying headers from Chrome can reproduce that in cURL, but still can't reach in requests module. Warning: page is full of russian letters, registration...

Grails: Carry forward params on hyperlink is clicked

How to carry forward the parameters when hyperlink is clicked? Here is my gsp code: <g:link class="grid_link" controller="user" action="delete" id="${}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure, want to delete?')}');">Delete</g:link> Here is my controller code: def delete() { try { def userInstance = User.get( //deleting the user //successful. redirect(action: "list",...

Laravel 5 pagination with trailing slash redirect to 301

I'm using Laravel 5 and notice that the pagination is adding a trailing slash before the ?page=# and with that, it always redirect to a 301 page. will do a 301 redirect to This is causing my pagination using ajax to slow down because it is having 2...

Google Analytics Event Tracking Form select

i´m trying to track the selected option values. I´m getting this error in console when i track the form: Expected a number value for the field: "eventValue". but found: "string". html code: <select name="fornoyd_service_nybil" id="liste_nybil" class="liste"> <option value=""></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option...

301 Redirect Regex Pattern - Sitecore Redirect module

I apologize if this seems like a rudimentary question, but I'm trying to setup a redirect pattern for the 301 module in Sitecore and am having a hard time with the proper pattern. I need to have the following path: converted to: Basically strip the numerical folders out....

How to redirect and then stop in node.js

I am trying to stop users accessing certain pages whilst logged in and not logged in with node.js. So far I have this idea: exports.blockIfLoggedIn = function (req, res) { if (req.isAuthenticated()) { //passport req.flash('error', 'Sorry but you can\'t access this page'); res.redirect('/'); } }; MA.f.auth.blockIfLoggedIn(req, res, next); res.render('users/login', {...

google analytics code on landing page and cookie law

New EU cookie law do not allow page to set cookies on first load and until user make any action, scroll is consider as implicit acceptance I'm not sure if ga('set', 'anonymizeIp', true); is enough to allow google analytics to be considered as non profiling cookie how can i activate...

How to redirect user to another internal page?

After creating the record, the user would be redirected to an internal page. "redirect to home.html" I've tried, add the code under "Sucess" but had no success :( How to be redirected after register or log in? window.location.href = ""; With the above code only works after pressing F5 <script...

Redirect 301 with wordpress articles from a domain to another

my client changed his wordpress website to a new domain. I tried with the htaccess to redirect 301 the articles dynamicaly but it's not working. The URL format of articles are : /%year%/%monthnum%/%day%/%postname%/ I put this in htaccess but not working : redirect 301 /([0-9]*)/([0-9]*)/([0-9]*)/(.*)/$1/$2/$3/$4/ Can you help me...

Apache htaccess redirect file

I want to redirect any request for file from my old website to the same file but with different url on my new website : -> I have tried this solution on .htaccess file: RewriteEngine On RewriteRule ^(aaa/bbb/ccc/)(.*)$$2 [R=301,L] but when I try with this url :...

Using Google analytics for Logged in User to get Session Duration

I have Community running in PHP, I want to use Google Anayltics to determine, which page has most visit by which username / IP address. Is it possible using Google Analytics ? Can i configure my google analytics to get session duration for each username [if available ] or IP...

How to get custom dimensions of a custom data source via management API?

Google Management API provides methods to get list of custom data sources and custom dimensions. However, I need to get the list of custom dimensions that belong to a custom data set, but can't find how. Is it possible at all?...

Referring to an ENV variable through javascript

I'm trying to set up Google Analytics, and refer to different tracking ids based on environment. I have a sandbox version of google analytics that has one id, running in a staging environment, and a production version of Google Analytics that has another id, running in a production environment. I'm...

PHP - Image Upload , move_uploaded_file not working?

I have coded a image upload script but when I click upload i get redirected to the upload page? Here is the code: $image1name = $_FILES['image1']['name']; $image1crntloc = $_FILES['image1']['tmp_name']; $image1ext = pathinfo($image1name, PATHINFO_EXTENSION); $image1size = $_FILES['image1']['size']; $allowedext = array("jpg","gif","png"); //check image 1 extension. if (!in_array($image1ext,$allowedext)) { echo "<script>alert(\"Image 1 has...

mod_rewrite - force redirecting to rewritten URL

I have following URL [1]: which i want to redirect to [2] I am using following code in my .htaccess: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^search/(.*)$ /?search=$1 [L] Code above works kind of fine since server understands both URLs:...

Redirect /{POSTID}/{CATID}/{TITLE} to just /{POSTID}/

I need help with a rewrite / redirect rule to fix some duplicate content issues on my website. I have a URL structure that it causing a ton of duplicate content. The same page can be accessed with: /Static1/Static2/Static3/{POSTID}/{CATID}/{TITLE} /Static1/Static2/Static3/{POSTID}/{CATID}/ /Static1/Static2/Static3/{POSTID}/ So, there are 3 copies of every page. I...

Google Analytics API Multiple Queries - Second Function?

This is a rather newbie question, please bear with me... I have successfully authorised my Google Analytics API account and am making the following call, which successfully prints the bounce rate. I want to add more queries on for things such as pageviews and sessions, how do i do this?...

htaccess redirect to subdomain based on query string

I searched for similar questions but none of them was applicable to my situation. What I need to do is redirect from old url's that have specific query string: option=com_virtuemart to a subdomain : Tried bunch of rules and conds but haven't achieved right redirection. It was always redirecting...

Using more than one field with IN ( ) for a sub-query

In Google BigQuery, I would have to do something like: SELECT hits.item.productName FROM [‘Dataset Name’ ] WHERE date, visitId, fullVisitorId IN ( SELECT date, visitId, fullVisitorId FROM [‘Dataset Name’ ] WHERE hits.item.productName CONTAINS 'Product Item Name A' AND totals.transactions>=1) However, this does not seem to be supported. What alternatives do...

Javascript: OS-depending Redirects doesn't work for IOS

i've got a pretty simple Javascript for redirecting a specific URL to an app in Google-Play-Store/iOS-Store or show an URL for desktop users depending on the client's opersting system. For the ios case the redirect is not being executed, can anyone explain what the problem is? (alert before redirect is...

Redirect only non-existing sub-directories to another domain using wildcard

In Apache, how do i redirect all non-existing directories for one domain (E.g.*.*) to another (e.g.*.*)? I don't want the redirect to occur if the directory exists on the first server ( Just for non-existing directories. Example: <--- Exists on the server, so it should NOT redirect....

Force WWW when URL contains path using .htaccess

I'm having a problem with my URL and my sessions. I wish to have ALL website pages be forced to use www. As it looks like now, the website looks like this: into into into into (this is what's wrong) This is...

.htaccess - 301 redirect where the URL structures aren't identical

I've been looking around for the answer to this but haven't been able to solve it myself. What I'm trying to do is redirect a group of around 1500+ URLs from one format to another, where the only thing that's consistent between the two is a string of numbers at...

.htaccess allow image to display directly

I have many files including images, php& js scripts and subfolders. I need to redirect to index.php for any uri using .htaccess. for example: should be redirect to index.php But images should not be redirected to index.php. Instead it should be printed directly in browser. For example: should...

Redirect specific Url variables

My site used to generate URLs like this: /data.php?s=1432862823&type=basic I have modified the program so the new URLs generated are: /d.php?s=1432862823&t=basic Since some people have bookmarked the old URLs I want to write a Rewrite rule that will get them to the new url. I've not this so far: RewriteEngine...

How to redirect domain with www or without www

I am using the following rewrite rule to redirect domain that has or has not www. RewriteCond %{HTTP_HOST} !^www\.[NC] RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] It works fine for any sub domain name like or But not adding https in case of or I tried...

Redirect to edit page automatically if record exists

I want to create a new record if it not exist. Otherwise, redirect to edit page automatically. In case the record exists (e.g: @sale is not nil). However, I got error message: app/views/sales/_form.html.erb where line #1 raised: First argument in form cannot contain nil or be empty Please show place...

Mod Rewrite Maintenance page that uses multiple URLs

I have a site the uses multiple URLs for a single application. Depending on the URL of the site you will get different content. I need to create a rewrite rule that redirects a user to a different page depending on what URL the user hits. For example: If a...

How do I redirect a URL with a parameter to a clean URL in htaccess?

I am attempting to 301 redirect several URLs with parameters at the end to clean URLs. For example I am trying to redirect: to Here is my code: RewriteCond %{QUERY_STRING} id=1234 RewriteRule ^news/news\.php$ /posts/vanity-url.php [L,R=301] I feel like I'm close with this code but it redirects me to:...

Redirect based on operating system

I'm new here and I apologize if this question is basic/stupid. I am not too familiar with coding, so please excuse my ignorance/glaring errors. I have tried to put this together using code snippets found online and luckily I don't have to code too much for this project. I am...

Redirecting http to https

I'd like to redirect all of my http traffic to https, currently in my htaccess file I have the following redirecting my http traffic: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] </IfModule> This redirects all of my non-www to www. What is the best way to...

Send events to two separate google analytics accounts?

Is it possible to send a tracking event to two separate google analytics accounts?

Why redirect PHP get only white page?

I'm developing in PHP, and I need to change page for different type of user, so I do in this way: switch ($_SESSION['ruolo']) { case 0: header('Location: ./php/admin/homeAdmin.php'); exit(); break; case 1: header('Location: ./php/150ore/home150.php'); exit(); break; case 2: header('Location: ./php/150ore/home150.php'); exit(); break; default: break; } But I obtain only a...

C# mvc4 - direct URL to controller

I have an external URL that points directly to a function in my controller but when I click on it for the first time, instead of reaching the page, I get to the home page. However, on the second click (and the following ones), I can reach the desired page....

Why mozilla changes the characters when i use the .net mvc statement redirect?

I'm trying to redirect to an external website when everything is done, but firefox changes the http word on the url for a weird set of characters. This is my server side code: [HttpPost] public ActionResult Postular(INFO_BASE_POSTULACION_model pInfoPostulacion) { string rutMD5 = Request["rutMD5"]; int idRegion = Convert.ToInt32(Request["idRegion"]); int idInstrumento =...

.htaccess | Too many redirects

I want to add a IP filter into my .htaccess file, but after I applied it, a too many redirects error will show. Content of .htaccess: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$ RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301] RewriteCond %{HTTPS} on RewriteCond %{REMOTE_ADDR}

Cross-Domain iFrame Tracking with Google Analytics

I have a site (rails 3.2) that displays 3rd party news articles within an iframe. One page contains one iframe. I have Google Analytics setup. For this I use The tracking script is in the head section of the container page. We have no affiliation with the 3rd party...

How to track traffic by domain in Google Analytics?

I am using Google Analytics in an embedded form. This form will be placed on various websites, and I want to track the traffic with GA. Creating a new property in GA for each website that embeds the form is not an option. As such, I'm looking to track traffic...

Redirect stdout using exec in subscript

I have one main script which is started as an service. I can't modify this main script, because it is often updated. This main script starts a program, which echo any log to stdout. So i can't see any log of this program. But this main script calls at the...

Excluding certain pages from being redirected to https

I'm using the following rules on my WordPress website to: Redirect all http pages to https Redirect the careers page to http <IfModule mod_rewrite.c> RewriteEngine On # Go to https if not on careers RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} !^/careers$ [NC] RewriteRule ^(.*)$$1 [R,L] # Go to http if...

Timeout handle email php

I would like to redirect my user to a new page, but the current site continues to run a script that sends a threaded message 10 minutes later at a specified address. I tried something like this: Header('Location:'); sleep(100); do_the_email_sending_here(); But actually it doesn't worked,because the site waited for...

Cannot get wp_redirect to work

I'm trying to send an email using wp_mail and then, if mail is sent successfully, redirect user to another page (or, if not successful, to an error page). My code is shown below. The email is actually sent, so wp_mail is working, but I cannot get the redirect to work....

GA Ecommerce tracking data not being sent

I have the following ecommerce tracking code. I am making use of multiple trackers. The pageviews are getting tracked correctly but when I view the ecommerce reports no data is coming through. What am I missing? (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] =...