I am trying to add BACK and NEXT navigation buttons to my Google site.
However, I want the URLs that are associated with the BACK and NEXT buttons to come from a Google Sheet.
In other words, I want the BACK and NEXT buttons in the Google site to get their URLs from specific cells in a Google Sheet.
If this can be achieved, I can dynamically change the URLs for the BACK and NEXT buttons in the Google Sheet, based on answers to questions posed in previous pages of the Google Site.
Here's a simplified flow diagram.
If this cannot be achieve using Google Site's native button component, can someone offer another way of doing this and still use the Google Sheet as a reference for the URLs?
Perhaps by using Google Site's <EMBED> option, where I can embed two buttons, BACK and NEXT and their URLs are still pulled from a specified Google Sheet.
Thank You Kindly, in advance, for your very valuable guidance.
Related
I have followed the tutorial on this website https://www.wp-tweaks.com/display-a-single-cell-from-google-sheets-wordpress/ which allows to dynamically display values from a Google spreadsheet on a WordPress page using a simple shortcode:
[get_sheet_value location="Cell Location"]
This solution worked seamlessly until a single page contained hundreds of those shortcodes (I basically need the whole content of the page to be editable via the spreadsheet). I started getting 100% Errors by API method (based on the Google Metrics) and the content was not displayed properly anymore. I realize that sending hundreds of read requests after each page load is not ideal and will inevitably affect the load performance and that Google imposes quota limits too. Is there a way to bypass this issue? For example by pulling the values from the Google spreadsheet only once a day. Unfortunately, I don't have much coding experience but I'm open to all solutions.
Thanks in advance!
You could publish the sheet to the web and embed it to your website:
In your sheet, go to File > Publish to the web
In the window that appears, click Embed.
Click Publish.
Copy the code in the text box and paste it into your site.
To show or hide parts of the spreadsheet, edit the HTML on your site.
It would look like this (click on Run code snippet):
<iframe src="https://docs.google.com/spreadsheets/d/e/2PACX-1vR3UbHTtAkR8TGNtXU3o4hzkVVhSwhnckMp7tQVCl1Fds3AnU5WoUJZxTfJBZgcpBP0VqTJ9n_ptk6J/pubhtml?gid=1223818634&single=true&widget=true&headers=false"></iframe>
You could try reading the entire spreadsheet as a JSON file and parse it within your code.
https://www.freecodecamp.org/news/cjn-google-sheets-as-json-endpoint/
I am trying to take a funding number from Indiegogo.com via IMPORTXML function without any luck.
I have used this code to scrape data from Kickstarter and it worked.
=IMPORTXML("https://www.kickstarter.com/projects/pavlyukovskyy/lego-compatible-screenless-coding-for-ages-3-6", "//span[#class='ksr-green-500']")
However, it doesn't work for indiegogo.com. I am trying this for indiegogo:
=IMPORTXML(https://www.indiegogo.com/projects/zlight-smart-bedroom-hub/", "//span[#class='data-v-3acff91c']")
I've also tried
=IMPORTXML(https://www.indiegogo.com/projects/zlight-smart-bedroom-hub/", "//span[#class='basicsGoalProgress-amountSold']")
Both versions didn't give any result
I need to show funding sum in google sheets.
Please see the screenshot https://www.screencast.com/t/h2ZwVsXr33
Here is the URL https://www.indiegogo.com/projects/zlight-smart-bedroom-hub
Unfortunately you can't scrape data from that page using importxml function because the content on the page is rendered using javascript and importxml can't import javascript rendered webpages.
Easy way to check whether a web content is rendered via javascript is to deactivate javascript. So the data which you get after deactivating javascript is the data which you can import in Google Sheet using importxml.
To Deactivate Javascript on some specific page.
Open that webpage in Google Chrome.
In the address bar, before web address, you will see an icon (lock or i etc), click on that then click on site settings and then in "Permissions" section, select "block" option for javascript.
After that simply refresh the page.
I need to track clicks to a webpage that already has Webtrends codes embedded. The thing is that I also need to track clicks to that page using Google Analytics.
It would have been easy if I can just embed Google Analytics's code on to the landing webpage but my client does not allow us to modify their webpage.
My question now is that, is it possible to track clicks on both Webtrends and Google Analytics by placing two tracking parameters (or syntax; query) onto one single URL?
For example:
http://example.com/adredirect.php?WT.mc_id=XXXXXXX?utm_source=XXX&utm_medium=XXX&utm_campaign=XXX
Within the "adredirect.php" page, I then can embed our GA code inside, with a redirect code to the correct landing page. I know for sure that by clicking the link above it will lead the browser to my desired page. What I don't know is that will the two parameters be actually captured correctly by both GA and Webtrends?
Are there other ways to achieve similar tasks?
Thanks to all that have time to help.
Regards!
I'm trying to track a series of emails and where users are clicking. I really only have google analytics to work with. I'm attempting to use google analytics to tag my links but all I'm getting is the campaign, all the other tags are coming up (not set).
example of the links I am using:
http://www.example.com/en/secured/rewards?entity_id=<%~user%>&pw=<%~pw%>&utm_source=confirmEmail1&utm_medium=email&utm_content=button1&utm_campaign=ssconfirmEmail1
This part of the link HAS to be there.
http://www.example.com/en/secured/rewards?entity_id=<%~user%>&pw=<%~pw%>
I believe something with the entity_id and pw tags are creating a conflict with google's tags. Currently I'm testing weather doing this to the link will work or not.
http://www.example.com/en/secured/rewards?utm_source=confirmEmail1&utm_medium=email&utm_content=button1&utm_campaign=ssconfirmEmail1&entity_id=<%~user%>&pw=<%~pw%>
My question is, first: Does anyone know a reason why this would be happening?
second (forget google analytics and do something custom): I know I could track the link by creating a redirect through a page and then having it redirect to the correct url, but I'm too new at this to know if I can carry the entity_id and pw through the redirect. If so, how?
Thanks!
Since the link was picking up everything but the content, I just eliminated that and changed the source to what I was using in the content. It's working now
http://www.example.com/en/secured/rewards?entity_id=<%~user%>&pw=<%~pw%>&utm_source=button1&utm_medium=email&utm_campaign=ssconfirmEmail1
I have a Google Docs collection that I would like to embed into an iframe:
https://docs.google.com/open?id=0B6yYgWS-CUJ2ZTUxZGI4MGUtMWM0Yy00YzY0LWIxOTMtMDFlN2RjNDAxNGM2
The problem here is that Google has set the X-Frame-Options header and so it seems they only allow this collection to be embedded into a Google site:
X-Frame-Options: SAMEORIGIN
Now I realize Google's reasons for not allowing their content in iframes some of the time, but this is one case where I feel like it would be nice to have the ability to do this.
With documents Google also allows two methods of "sharing"
You can click on the "Share" button and set visibility, which will give you a link to a document
Or you can click on "Publish to Web" and it will give you a link or an iframe option.
The iframe url is similar to the link URL except that it has the "&embedded=true" query variable at the end. The same thing is true for Google Maps except the parameter is "&output=embed"
Who while I believe there is nothing I can do with headers or Javascript on my site to allow the content of an iframe for a Google Docs collection to load, I was hoping someone might know of a way to generate embed code for a Google Docs collection which would allow it to be loaded in an iFrame.
Update: It looks like Google has allowed embedding Google Docs/Drive items via iFrame. Here are the current headers for that page (note that this URL is after the redirect):
Try these:-
single – setting to true displays just one sheet in the spreadsheet. The default sheet it will display is the first one created in the spreadsheet. This can be changed using ‘gid’ below.
gid – this needs to be a numeric identifier of the sheet you want to display. The first sheet created is 0, but others will have longer identifiers. To find the ‘gid’ for the sheet you want to display, go to the spreadsheet in Google Apps itself, and click on to your desired sheet. The URL in your browser should change to something like this: https://docs.google.com/a/mycompany.com/spreadsheets/d /15B___SOYjsRmU9tiwZly318HZnFHOHeayS6UTHx7Pu2I/edit#gid=419657423
The bit at the end of the URL shows you the ‘gid’ for the sheet, and that is the number you need to bring into the shortcode in your website.
range – set this to the cell range you want to display within the sheet (or leave it out to display the whole sheet). In our example, we set this to f2:g6. Note if you’re being pedantic then you should really change the ‘:’ to ‘%3A’ since colons should be encoded in URLs – but most browsers should understand the colon, so don’t worry. If you like to be correct, you’d use range=f2%3Ag6 instead.
headers=false - Row numbers and column letters are not displayed.
widget – setting this to false removes the sheet selector bar when it’s embedded.
chrome – setting this to false removes the title bar showing the spreadsheet name, above the sheet.
So putting all together:-
<iframe> src="https://docs.google.com/spreadsheets/d/[Googlekey]/pubhtml?gid=28&range=a1:s45&single=true&widget=true&headers=false" </iframe>
Allan