I have a site (I can't provide a link to it), where we're using links to generate lightboxes that have iframes to content.
We're linking to the content like so:
<a href='/path/to/lightbox.php' onclick='generateLightbox("/path/to/lightbox.php")'>link</a>
On the page, we're using the following to forward to the main page and open up a lightbox if a user tries to access the lightbox content directly:
<script>window.location="index.php?openLightbox=/path/to/lightbox.php"</script>
Our problem is that google is not indexing these lightbox pages. While going through the webmaster tools, it's giving a warning that a "redirect" is detected.
Is there anyway I can make sure to redirect users to the main page and open up a lightbox without tripping up google's quality checker? I believe my problem is that google is seeing the redirect and not indexing the content, yet I'm using the method I've seen suggested on a couple different resources such as this SO question: Redirects & Google Indexing
In the end, the only solution we could find was to detect for google bot, and not redirect.
Related
Okay so I'm a google analytics & js noob so I know the absolute basics.
On my site http://www.wildseasonthegame.com I have some humble bundle widgets which are Iframes.
I'm still trying to understand analytics but as I understand it Theoretically I should be having a code like this
something goes here
Now my question is =
Can I replace href with iframe and will it just work? Or will i need to do other stuff (like add some extra JS) to make it work, seeing as how iframes are funny little things
Or do I wrap each iframe in its own a href with a # destination and track conversions that way?
HOw do i differentiate between clicks made to input their email and clicks to purchase?
Any other suggestions how I can track the conversion offsite. Humble bundle has an off site thank you page, but It doesnt look like it redirects back to myne, let alone guarantee tha tpeople will arrive at my page instead of closing their browser after the transaction.
If content is iFramed in you're unfortunately going to have a hard time getting any tracking on it thanks to the same-domain policy. The best way would be to add tracking code to the pages iFrame'd in... but good luck getting Humble Bundle to add your code to their pages. You can get some click tracking on it, but it'd literally just be clicks anywhere on the iFrame.
I have two different questions I would like to ask. I am new to javascript and I am trying to create a project ... of some sort.
Firstly, is it possible to have an integrated webbrowser within ... say a PHP page? e.g. using javascript, I have a canvas sized 500 x 700 within my "index.php" page, and can navigate to any website while remaining on my "index.php", but the websites appearing on that canvas?
If this is not possible, then is it possible to navigate to a website, and then interact with the elements thereof? I doubt this because you would no longer be connected to your file if you rediirect to another website, hence the integrated idea.
If neither or those are a possibility, then is it at all possible to interact with an EXTERNAL website's elements? External being not yours in this context.
You can use an iframe tag to load an external page, however
With most modern browsers you're not allowed to interact with the elements for security reasons
Many sites (still for security reasons) don't want to be loaded inside an iframe and they try to either escape the iframe or just render back a blank page instead.
One security problem is that a malicious page could open an iframe with e.g. a buy page of amazon.com and then render over it another opaque element that lets the click go through it.
This way a user may be tricked into click over a "watch the cute kitties" button and instead is clicking on the one-click-buy button of amazon (or liking a facebook page, or starting following a spammer on twitter or ...).
We are putting out a press release that contains links to our website and to other websites.
Right now I have a redirect.php on my website that is redirecting the user based off the variable located in the URL (e.g. redirect.php?id=1) using a meta refresh. Google analytics is loaded on the redirect.php so I can capture that visit and see where visitors are coming from before we redirect them to their final destination (either an internal page or an external page).
I do not like having to wait for google analytics to load before the user can be redirected.
Is there a better solution for this?
Here's how I would to it...
Take a look at How to Track Downloads & Outbound Links in Google Analytics
You have two kinds of links you want to track:
Links to other sites.
Links to your own site.
The how-to above will explain setting up clicks on offsite links as google analytics events (this is a better way to treat this activity than as page views).
You can then use the same basic methodology to track the clicks to your own site from within the press releases. You'll just need to find a way to select them in jQuery. Maybe by the id of the div contains your press releases, maybe you'll need to add a special class to the links you want to track. It would depend on how your page is set up.
I'm using Fancybox to display webpages through an iFrame. Those webpages are like a little information network: they're calling each other via links, and the user can circle through them.
I wanted to implement back et forth buttons: I did it by putting those buttons directly inside the displayed page, and working with the history (history.go(-1)) : that works, as long as the browser behaves in the way they do with iFrames.
However, there's a problem: if the user clicks on the back button and is on the first page of his navigation, it will bring him back out of the website itself (as, out of the fancy box, it's a one-page website).
As for security purpose you cannot have access to the history and test it to avoid that, is there a way to find out if the user will get out of the domain if he does a step more? Document.referent doesn't seem to work in the context of Fancybox and iFrames…
Thanks A LOT, I tried many (mainly stupid things), including a javascript session with window.name (see how desperate I am ?) !
I have put a facebook like, facebook send, and twitter tweet button 10 times on my web page (1 for each article in my thread), but yet the page loads very slowly. Right now the site is just running on my local XAMPP stack but when I comment out those widgets, the page loads instantaneously. Otherwise it takes like 10 seconds to load.
It would be helpful to see the code to make sure you are applying it correctly, but I've experienced similar symptoms before. The way I would render it is by having the associated external Javascript files just before your </body> tag and not in your head. If the connection to the external host is slow, it can cause parallisation issues so you want to load it last.
This is happening all over the web lately. I'll see a slow-loading page and sure enough at the bottom there's a note that facebook or twitter is still loading.
The solution I found was an extension that shows the FB, Twitter buttons but doesn't actually load them unless you click the button. That way your page loads quickly and if FB or Twitter is slow that's their problem.
I use Sharrre for social sharing buttons. I activate it on mouseover so nothing is loaded until the user actually needs it. Hard to get it faster than this. It also supports a few other networks.
I don't load social sharing buttons directly anymore and only do it when there is no other option. Those things are horrible for loading times specially if used multiple times on the same page.