Make Google Bot detect AJAX contents - javascript

I'm developing a site (not mine) and I encountered a big trouble!
In this website I've got some modals that will open after a user clicks on a product, but I need to do so Google Bot detects these modals like pages. When a modal opens, a JS Function adds a # parameter to the URL like "#abc=modal_one".
I want that in Google Result appears this page as "www.test.com/page.php?#abc=modal_one". I've tried (and I'm trying) to render the page like Google Bot in Google Search Console, but GSC opens only the page and not the modal. I also added a ES6 (JS) code that just edits the page title when the modal is showing to the user (after user clicks to open the modal) but nothing, Google does not detect the page title set after the page is loaded.
If you can't understand something just tell me and I will try to explain my trouble newly.
Thanks in advance to all the StackOverflow community :)

Try exporting the various pages to a dynamic sitemap that Google can read.
View the Categorize parameters with the URL Parameters tool page for more information.

Related

Google maps not showing when clicking on href link

I have integrated google maps in one of my web app page(Say, pageA). Web app is implemented in RoR and I am working on localhost/development phase for now.
Interesting thing is that google map does not display correctly when I reach to pageA by clicking on some href link but it displays correctly when I refresh the page(pageA)
I do not know in which direction I should start by debugging. Is it browser or cache or something else?
I hope that code part does not have anything to do with this problem since it is opening while refreshing the page. Having said that, I would be happy to share the code part in case someone want to have a look at it.

Chrome extension- Inject script on multiple pages

I am a newbie to extensions. i want to create a extension, when clicked on the icon it should open up the www.gmail.com, input my user name and password and login automatically,click on the first mail. Your help is highly appreciated. I tried many things like chrome inject api but did't work out.
Like said in comments, go have a look to documentation sample codes, it's a good start.
For your extension you should do something like this :
Open a tab with the gmail.com url.
in the callback, inject a content script in the newly created tab
In the content script put the login and the password in page input and then simulate a submit button click.
Try to do this for a first try. When you get it work, You can try to open the latest email received. Look for tabs and runtime message api to send data or event between injected scripts and background script.

How do pageActions and browserActions differ?

I'm a writing a chrome extension that allows users to do the following:
Load data into the popup when the icon is clicked
Change the data in the popup based on actions the user takes on the page
Append elements to the DOM of the page based on actions taken in the popup
It seems that I can accomplish 1 with a script in the browser_action field of the manifest, but perhaps I need a page_action script for 2 and 3?
The core of the problem is that I do not know exactly how browser_actions and page_actions differ from each other. My limited understanding is that page actions allow data populated in the popup to be manipulated dynamically. Is this true? I cannot find an explanation about the differences that makes sense to me.
Browser Action is a type of extensions that use icon on the right of address bar. You click on that icon and popup page is loading. Those extensions work regardless of page currently opened.
Page Action only works while certain webpage(s) is opened. It displays as an icon inside the address bar (near page URL). This is for extensions only working on certain websites.
If you want to make your extension working on every website, you should use browser_action.
For further information you may want to visit these pages:
http://developer.chrome.com/extensions/browserAction.html
http://developer.chrome.com/extensions/pageAction.html

Facebook share with custom text on button

It used to be done this way:
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<a type="button_count" share_url="http://google.pl" name="fb_share">Share this page on Your's wall</a>
And it used to generate a share button with text "Share this page on Your's wall" instead normal "Share". Since last update it doesnt work anymore.
Is there any posibillity to change the text on share button?
With Facebook JS SDK:
You now have to use the Feed Dialog, which is part of the Facebook JavaScript SDK.
Without Facebook JS SDK:
If you don't want to be bothered with their SDK, you can use this simple link instead:
Share this page on your wall
Here's what it'll look like if you're sharing Google.com with this link:
https://www.facebook.com/dialog/feed?app_id=140586622674265&link=http%3A%2F%2Fgoogle.com&name=Google&redirect_uri=http%3A%2F%2Fs7.addthis.com%2Fstatic%2Fpostshare%2Fc00.html
Also, please acknowledge these three things:
You need to replace [[URL]] and [[TITLE]] with a link to the page you want to share and its title (both url-encoded).
The Feed Dialog has to show from which Facebook app the post comes from. The app_id parameter in the URL above is the one from AddThis. Create a Facebook app and put its own id in the URL to use the name you want instead of "AddThis Sharing". You can keep the app_id from AddThis though, it works just fine.
The last parameter (redirect_uri) is the page where the user will be redirected after sharing. It's currently a page from AddThis with some JavaScript that will close the tab / window. That way, the dialog just disappears when it's not needed anymore. You don't have to change it either, works great.

Google Analytics executing in a dynamically created modal window

I am using JavaScript to create a modal window when a user either clicks a link or submits a form. The modal window holds either a form if they click a link or a thank you page when a user submits a sign up form. The modal window is populated using innerHTML.
The issue I am having is that these modal windows have Google Analytic tags in their source code. For some odd reason the Google Analytics is not executing. I have tried to place the actual ga.js source into the pages, that didn't work. I have put the Analytics code in two separate files but that is not working either.
Any one ever ran into this issue? Any help would be greatly appreciated.
Don’t add script tags using .innerHTML. Just fire pageTracker._trackPageview() directly from javascript, as it is described in the Google Analytics API

Categories

Resources