I'm using Google Analytics and other tools I have a problem regarding the build of ReactJS.
I was trying to get analytics from my site using react-helmet to change the title and the HTML lang parameter depending on the route the user was in.
After the build in production, Google crawl seems to kick in before the JavaScript execute so my analytics are just working for the first language and title that was set so (<html lang="en">) in my case.
Is there any way to get these analytics without having to generate two builds with two languages and title. Or ReactJS is just not a good solution.
https://codesandbox.io/s/okei4
Check out how react-ga could be used in a ReactJS project. This code is fully working so in Google Analytics I can see every page was visited.
Related
I have found an interesting google script file, but would like to change it a bit to run it locally on my system.
Locally I use Python.
How can this be easily converted or to which language is it comparable?
The script is generating a new presentation with a specific slide template (shape).
This part raises the most questions, of how to do it locally.
Probably something with OpenCv / mathplotlib to generate a template.
If you are looking "easy" options, keep using Google Apps Script.
Google Apps Script uses JavaScript as programming language and has several services that make it convenient to automate Google apps like Google Slides.
In order to minimize the convertion work, you might create a web app using Google Apps Script to respond to HTTP GET or POST requests that you might do from Python.
If you still insist is using a Python only code, you should "translate" JavaScript code into Python code and replace the calls to services like Slides (SlidesApp) into calls to Google Slides API. This implies that you will have to use Google OAuth 2.
Another option is that you enable the Google Apps Script API (this also requires Google OAuth 2) and call the Google Apps Script functions from Python.
Also you have the option to change your approach, i.e., instead of using Python run Google Apps Script functions using CLASP, but still can't be qualified as easy.
Is it possible to use either Google Apps Script or the Google Sheets API to host a REST API, so that I can make client-side content requests on a static web page? If so, how would I go about this?
I'm building a simple website hosted on GitHub, and I want to experiment with using a spreadsheet as a content management system, e.g. fetching a running list of projects with corresponding text, images, etc.
Forgive me if I completely misunderstood the capabilities of either/both of these applications, or overlooked a previous ask!
You can use the Sheets API with multiple languages.
Here you have the different quickstarts that show you how to do it: https://developers.google.com/sheets/api/guides/concepts
Also you can create a Web App with Apps Script and embed it in your website: https://developers.google.com/apps-script/guides/web
I am not an engineer but im asking question beyond my understanding. The company i work for recently reported that the Google Analytics often gave us wrong statistics. When i tried to scrawl the website's HTML code , I found that the facebook conversion pixel code was put ahead of the google tag manager code on our website. Does that affect how google analytics work ? In my mind, google analytics suggests us not to put other tracking code to interfere GA.
While it defeats the purpose of tag management systems to have tags outside the tag management container Google Analytics will work just fine with other tracking pixels, and Google certainly does not say anywhere that you should not use other tracking software. Nobody would use GA if it interfered with the normal operations of a website.
So no, the Facebook Pixel will not interfere with GA. You can easily check if the data is transmitted correctly if you use the Chrome extensions that Google provides - look for "Google Tag Assistant", that's the most userfriendly option. Install it via the Google Play Store, it will add a small icon to the right of your adress bar, and if you click the icon you can enable it for any given domain. It will display an error via a red icon if something is wrong, and will give some detailled information about what is being sent to the Google Analytics tracking server. That might help you to find the actual error if there is a problem with data collection (it will not help you to find configuration problems).
I would like to develop an app for Bigcommerce that other users of the platform could use. The app should add a simple javascript embed code to all pages of the store. The embed code is similar in nature to google analytics embed or chat services embed codes.
I have opened up a trial account with Bigcommerce and found out that it is very easy to manually edit the page templates to add such an embed code, but I would like to be able to develop an app that store owners could install and not have to mess with editing and copy-pasting embed codes into their page templates.
Unfortunately there is no mechanism currently for BigCommerce that allows for the editing of template code via the app.
I can give you pointers as to where you can put your code to make it globally available.
If you need something in the <head> globally: /Panels/HTMLHead.html
If you need something at the beginning, right after the <body>: /Panel/DrawerMenu.html
If you need something at the end, right before the </body>: /Panels/Footer.html
These are the 3 common places most javascript things (like tracking pixels and analytics) usually go.
Other "extensions" for BigCommerce, such as OLark and Zendesk and Analytics, all just give either a web page with instructions, or a PDF with installation instructions. You could provide your functionality via the same means in lieu of an app doing it.
I haven't really worked with Bigcommerce, but I went thorough their docs and it looks like there is no option for custom module that you can upload and use on their server. And that makes perfect sense.
So I would say the only "forth to try" option is to build browser extension, that does the job for you. As I understood, you can control html output of your store by choosing "Themes" tab > "Edit HTML/CSS", so extension should be able to walk through the three of pages in the left panel.
Chrome Extension
Firefox extension
I'm using google maps for a website. All the data available via the map on the home page is also listed on other pages throughout the site, but with javascript turned on these pages redirect to the home page: eg http://host.com/county/essex redirects to http://host.com/#county/essex, which makes the map load all the data for Essex.
I'd like Google to index all the pages on my site, as otherwise none of the data included in the map will be searchable. But I know that for very good reasons Google doesn't normally index pages which get redirected. Is there a way to get Google to index my pages. Or, failing that, is there a way to submit all the data to google in some other way?
*edit
All my pages are linked to from my main navigation (it's just that javascript overrides the default link action)... the upshot being that there should be no need for a sitemap as all the pages are discoverable by google bot using normal link following
Regarding submitting data to google, there is a thing called Google sitemaps that is supposed to notify google of all URIs/locations that exist on a given site and are/should be indexed. Truth is, however, that sites that aren't crawlable by default rarely benefit much from the aforementioned sitemap.
Have a look at site Maps it allows you to include urls you need indexed.
You write:
with javascript turned on these pages redirect to the home page
Google bot doesn't execute javascript. If your redirects are made in javascript, Google bot will simple index the page and ignore the redirect.