setting up Google Webpage Optimizer where text and conversion pages are the same - google-website-optimizer

I have a site where both landing and thank you page are index.php page with different content loaded dynamically. As I'm generating the javascript and trying to validate it, it gives me an error saying that JS is not installed on the thank you page, which makes sense, because its content is not loaded yet. I was wondering how I can circumvent this issue? Any suggestions?
Thanks!
Luka

You will need to do the offline validation of the conversion page, follow these instructions.

Related

Should I senatize this in angular1?

We are running a legacy CMS system that stores some content in pure HTML. This content is now fetched using http from my angular 1.5 application and displayed on the page. Should I now senatize this HTML before adding it to the page? If yes, how? If not, why not?
This depends who can enter the HTML. If only authorized personal can enter content, you could sanitize it, so it gets displayed on the page... however this may cause errors on the page, when the syntax is incorrect and I wouldn't suggest it if avoidable.
If the content can come from anyone, you definitely absolutely shouldn't insert it into your page, it opens it up for XSS attacks!
See this video, how an attack can take over your site: https://www.youtube.com/watch?v=U4e0Remq1WQ

How to display my AngularJS correctly for GoogleBot and Optimizely?

I've a website called VoteCircle (www.votecircle.com), but i noted that it doesn't display well for Google Bot/Optimizely (used for A/B tests). It shows only the content that AREN'T in ng-view. All content in ng-view isn't displayed.
it was made in AngularJS and the content in ng-view isn't displayed for those bots/previews that i mentioned.
What's the best way to fix that?
Please, see attached screenshot.
Thanks.
There is a pretty easy fix for this. In your URL bar, click on the small key and enable mixed content. The browser blocks loading mixed content in the editor by default (HTTPS and HTTP resources combined). By enabling it you can load the rest of the page in the editor.

Angular.js: Is there any disadvantage of hash in url with respect to SEO?

I am making a website using AngularJS, I am curious to know that is there any disadvantage of hash in url with respect to seo ?
e.g. http://www.website.com/#about-us
I'll appreciate any contribution.
Thanks
If we go back to the basics, HASH # means a DIV ID in your HTML, and to talk in more details Google ignores anything after the HASH.
Example, this page www.mydomain.com is similar to www.mydomain.com/#about-us
This is an advanced technique some marketers are using it to track their campaign without using parameters like UTMs to avoid content duplication.
To make sure your page is loading without any errors, try to disable the JS from your browsers using "Web Developer Tool" and then load your page, i think you will get a white page without content and this is the way Google and most of the search engines see your pages.
Also there is another way to test it by going to Search Console "Webmaster tool" and use fetch as Google, here you will see exactly how Google view your page.

Weird Content of Facebook share/like button preview from angular app

I have an issue with share/like button from Angular app. I finally made it working correctly with links but share/like preview if completely wrong. I tried XFBML.parse(), switching to html 5 mode, etc.
There are two complete enigmas:
1. I got "Given URL is not allowed by the Application configuration..." despite adding all possible variants to fb app setting.
When share preview appear - it has "Angular", but I never added it anywhere.
Here is the link
Would be grateful for any ideas...
Thx
The Facebook Scraper only looks at the HTML code your server delivers, it does not execute any JavaScript.
So if you want to share different articles, you need an individual URL for each article, that delivers the relevant meta data when requested from the server.
You can find some more explanation and hints on how to implement this in this article, http://www.michaelbromley.co.uk/blog/171/enable-rich-social-sharing-in-your-angularjs-app

Mobile Viewing for Google Apps Script with Bootstrap

I am trying to design a mobile first web app using Google Apps Script.
I would try to replicate the most basic Bootstrap page (http://getbootstrap.com/examples/navbar) in a Google Apps Script.
This is the way the bootstrap page should render on my mobile device:
but instead my page loads like this (ie. http://goo.gl/yZpgUg):
This is my code.gs:
function doGet() {
return HtmlService
.createTemplateFromFile('index')
.evaluate()
.setSandboxMode(HtmlService.SandboxMode.NATIVE);
}
My index.html is copied and pasted from http://getbootstrap.com/examples/navbar with CDNs replaced as appropriate.
I figured HtmlService.SandboxMode.NATIVE was important to get this to work but doesn't seem to work.
Dear world - any help would be greatly appreciated.
Cheers.
UPDATE 1 - (THANKS FOR YOUR RESPONSES!)
in IFRAME:
IFRAME console errors (2):
NATIVE console errors (lots):
Bottom line - clearly GAS is not liking it and doesn't seem super straight forward - I've ended up turning the GAS into an API which returns JSONP from the spreadsheet I need - much more straight forward. Thank you for all your help!
I know you decided to go another route, but I got this to work in the same scenario. You can simply add the meta tag on the GAS code using the following code:
var output = HtmlService.createHtmlOutput('Hello, world!');
output.addMetaTag('viewport', 'width=device-width, initial-scale=1');
So when you serve up your html in doGet add the meta tag. Check out this link for more information: https://developers.google.com/apps-script/reference/html/html-output#addMetaTag(String,String)
Apparently Google can't load Bootstrap from their server, try copying everything to GAS and include in the page as explained in best practices. Also switch back to IFRAME when testing.

Resources