Internal Page Links& Google Analytics

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
mehrdad
Forum Members
Forum Members
Posts: 16
Joined: Mon Dec 16, 2013 8:53 pm

Internal Page Links& Google Analytics

Post by mehrdad »

Hello,

I have a quick question but I can't seem to find the answer in the docs or other topics in the forum (at least I tried)

I have added Google Analytics on one of my CMSms websites and it's all working fine. but apparently the "internal page links" are not counted by google.

Google still tracks the destination page when you enter the URL for the internal page.

Is there any way to add some javascript code/event to an internal link page?

I just want to see if that's supported by CMSms.


I hope I'm being clear.

Thank You
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Internal Page Links& Google Analytics

Post by Dr.CSS »

Most times the code for that goes in the template so you need to make sure it is in all of your page templates...
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: Internal Page Links& Google Analytics

Post by JohnnyB »

I believe Internal Link content type still sends a "302 Temporary Redirect" Header response. Maybe that is why GA will not respect those?

Also, I haven't tested this in a couple years but the page alias assigned to the Internal Link page was still reachable. For example, if your Internal Link content has an alias called 'about' and the destination page is called 'about-us' both 'about' and 'about-us' are reachable (the 'about' page will not have any content). This creates another SEO challenge...

I recommend using a 301 Redirect whenever a page will be redirected to another so that the final page receives SE ranking, value, etc. Google and others like 301 Permanent Redirects.

The best way to do this is not to use Internal Link and instead use a regular content page with the Internal Page 301 Redirect tag

Code: Select all

{redirect_page_301 parent='parent-alias' page='destination-page'}
This will redirect a page to your-site.com/parent-alias/destination-page

I use a very basic template for any content that will hold the Internal Page 301 Redirect tag so it doesn't contain the usual CSS, JS, template images, and other content... The browser sees the 301 Redirect in the content Header and sends it along to the final destination.

Code: Select all

<!doctype html>
<__html lang="en">
<head>
<meta charset="UTF-8">
<base href="{root_url}" />
<title>{title} - {sitename}</title>
<meta name="Robots" content="noarchive, nofollow">
{if isset($canonical)}<link rel="canonical" href="{$canonical}">{elseif isset($content_obj)}<link rel="canonical" href="{$content_obj->GetURL()}">{/if}
</head>
</__body>
<!-- pageAttribute: NotSearchable -->
{content}
<__body>
</__html>
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Post Reply

Return to “The Lounge”