I followed the Google promotion email code template and drafted one demo.
https://developers.google.com/gmail/promotab/overview
and the code also passed Google makeup test
https://www.google.com/webmasters/markup-tester/
however, when I use my email tools inserting the following code into the HTML editor and send out the EDM, no effect appears, it just shows up like a normal email (no image/banner appears in promotion box).
I saw there is another document from Google but it only address the "one-click" / "go-to-action" email
https://developers.google.com/gmail/markup/apps-script-tutorial
Would highly appreciate it if anyone can help to point out mistakes.
FYI Promotion email markup does not require whitelisting
<!-- Paste your own code here, or change the existing code to experiment with what works -->
<!-- Feel free to paste the entire HTML of your email -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script type="application/ld+json">
[{
"#context": "http://schema.org/",
"#type": "Organization",
// WARNING: Before sending email, either point the logo
// at your own image or delete the logo annotation.
//
// If showing a logo, we recommend using an https URL.
// It's not a requirement today, but may be in the future.
"logo": "https://www.gobear.com/hk//themes/custom/gobear/apple-touch-icon.png"
},{
"#context": "http://schema.org/",
"#type": "EmailMessage",
// Use this optional alternative subject line to avoid duplicate text
// between the subject, deal badge, and discount code.
"subjectLine": "【後疫情時代】幫你睥實全港理財貼士 🐻"
},{
"#context": "http://schema.org/",
"#type": "DiscountOffer",
// Describe your discount, this will be shown as a badge (eg "25% off" or "free shipping")
"description": "6月理財小貼士",
"availabilityStarts": "2020-07-18T22:51:01-07:00",
"availabilityEnds": "2020-07-31T22:51:01-07:00"
},{
// Promotion card with single image.
// We recommend using an https URL. It's not a requirement today, but may be in the future.
// Any image size will work and will just be cropped automatically.
// GIF & WEBP images are not supported and will be filtered out.
// Sample image is 538x138, 3.9 aspect ratio
"#context": "http://schema.org/",
"#type": "PromotionCard",
"image": "https://newtwb.s3.amazonaws.com/images/gobearhk/GoBear_Edm_banner_20200618.jpg"
}]
</script>
</head>
This appears to be a bug!
After doing some testing, it appears that neither the Promotional Email nor any Email markup seems to be working.
I have taken the liberty of reporting this on Google's Issue Tracker for you, detailing the behaviour:
Following the Apps Script Quickstart for Email Markup does not display the Go-To action
You can hit the ☆ next to the issue number in the top left on the page which lets Google know more people are encountering this and so it is more likely to be seen to faster.
Related
Hy
How i can add a default image for my site to display in the google search results when i type the name of the site to search for?
Currently every few weeks a different image/picture is displaying, current one picture from my news.
Google Search result =
https://www.may_site.com [ logo ]
Currently I added a logo to my first link at the top of the page..
<img src="/images/logo.png" width="70" height="70" alt="Sitename Logo">
Sometimes no picture is visible :/
Google reads meta tags in your page <head></head> to understand what you want to show in search results.
As far as I know there is not an official "logo" or "image" tag that Google support, but is smart enough to understand that "og:image" is the page image.
<head>
<meta name="og:image" content="http://ia.media-imdb.com/rock.jpg">
</head>
You can read more here: https://developers.google.com/search/docs/advanced/crawling/special-tags
And you can find a comprehensive list of meta here
https://gist.github.com/lancejpollard/1978404
Google supports defining your logo in structured data. Here is their documentation on it:
https://developers.google.com/search/docs/advanced/structured-data/logo
However, I think you are talking more about a general image related to a page.
Using the og:image meta tag mentioned by #supermod can be a hint. Google also understands images in certain structured data types like recipes, products, articles etc. Their gallery shows what structured data can cause rich snippets like an image:
https://developers.google.com/search/docs/advanced/structured-data/search-gallery
But it is not necessary to provide metadata or structured data to get images in the search results. Sometimes Google just picks one from the page.
This is a bit of a strange one and I think it's a basic syntax error, but I cannot seem to pin it down.
I have successfully got my controller in Sails (NodeJS) sending some JSON through to the view (an EJS file). It's an object called "Profile" (pulled from a DB, which I have connected & working).
The JSON my page is receiving looks like this:
[{
"personal_photo_url": "bing.jpg",
"show_profile": false,
"id": 1
}]
The relevant code snippet on my .ejs file (view) looks like this:
<h3>Personal photo: {{profile.personal_photo_url}}</h3>
<h3>Show profile to others?: {{ profile.show_profile }}</h3>
<h3>User ID:{{ profile }}</h3>
When the page loads, I'm not seeing any text against "welcome sound" or the "show profile to others?" line, however when I just show "profile" without referencing the fields in the "User ID" line, I receive the following HTML displayed on the page:
Personal photo:
Show profile to others?:
User ID: [ { "personal_photo_url": "bing.jpg", "show_profile": false, "id": 1 } ]
It's worth pointing out that when I do some querying all the fields are listed as "undefined", even though they are showing per above.
So my question is pretty simple - how do I get the values from these fields showing without all the JSON formatting?
Ok, after a bit more trial and error I realised what had happened is that I was sending in an array to the page.
When I adjusted my search result from the database to use the .findOne() method instead of .find() the data was presented as I needed it (ie just one record), and my code above worked perfectly.
I want to integrate google search in website such way that whenever we search in google the search box should show like below image. we have used #context and schema and somewhere I found on google block of code is:
<script type="application/ld+json">
"#context": "http://schema.org",
"potentialAction":
{
"#type": "SearchAction",
"target": "http://www.WEBSITENAME.com/search?q={search_term}",
"query-input": "required name=search_term"
}
</script>
I got help from here.
http://searchenginewatch.com/sew/how-to/2431095/how-do-i-get-a-search-box-to-appear-in-my-site-s-search-results
Hope this will help you. Also It takes some time.
Google Image Search can also filter for re-use licences of the images. I'm wondering how they know which licence an image is published under. How can I declare that licence on my website? Is it possible to declare a licence for each image on the page, or only for the entire page including all referenced images (possibly including pre-fetched content)? And what are the licences that Google understands and can classify to their filter?
I've searched around for a while and have finally found a solution, thanks to Creative Commons. In short, for Google (and other search engines) to know what license the content on a specific page is under, you have to tell it.
This is done the same way as you give Google other data like page relationships - using the HTML structure of the page. In this case, you use the rel attribute of a tags. To declare a single-page license:
License
Of course you can change the link text to whatever, but the important bit is the rel attribute. The href should point to the license itself.
I don't know how Google knows what license it is, but that's how you declare it, and Google's robots will do the magic for you. In terms of bulk licensing, I dare say you could preprocess pages with PHP (possibly in conjunction with an SQL database) to insert this license tag.
Sources:
Creative Commons Licence Chooser;
MicroFormats' RelLicense
You can also have a look at Sitepoint's definition of the rel attribute and its uses.
Hope this helps.
In this answer, I am assuming that:
You have a collection of images licensed under, say, a Creative Commons license.
You want image search engines to return your images when the user is filtering for Creative Commons-like images.
Creating metadata HTML pages
I think the best way to attach licensing information to an image is to create a canonical HTML page corresponding to each image--much like how Wikipedia or Flickr does it.
Let's say that we want to license a gallery of images under CC BY-SA 3.0 where every image has a URL of the format https://example.com/img1.jpg.
In that case, we embed the licensing information in HTML pages with URLs that look like https://example.com/img1.jpg.html.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Viewing img1.jpg</title>
<meta property="og:image" content="https://example.com/img1.jpg" />
<link rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/"/>
<link rel="canonical" href="https://example.com/img1.jpg.html"/>
</head>
<body>
<div>
<img src="https://example.com/img1.jpg" />
<small>
This image is licensed under a
<a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/">Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)</a> license
</small>
</div>
</body>
</html>
Using schema.org metadata
We can also schema.org ImageObject metadata to our metadata pages--encoding our metadata as microdata, RDFa, or JSON-LD. The schema.org markup makes it possible to add additional annotations that describe the copyright holder and how to obtain a license to use the image.
Here is an example of a JSON-LD document that you can put inside the <head> tags.
<script type="application/ld+json">
{
"#context": "https://schema.org",
"#type": "ImageObject",
"author": "Bob Smith",
"copyrightHolder": "Bob Smith's employer",
"copyrightYear": 2021,
"contentUrl": "https://example.com/img1.jpg",
"license": "https://creativecommons.org/licenses/by-sa/3.0/",
"acquireLicensePage": "https://example.com/img1.jpg.html"
}
</script>
Exposing your metadata HTML pages to search engines
Finally, you should make it easy for crawlers to find these HTML pages. You can organically pepper in links to these HTML pages whenever you embed one of your images. Alternatively, you could just list all of your HTML pages with the Sitemap Protocol.
I have searched for two days on google trying to solve this problem. I have also searched this forum and read the FB Dev page till my eyes hurt. I asked this question two days ago and it got removed. I completely understand but if I am asking it incorrectly please, please, help me to ask correctly or point me in the right direction or tell me im an idiot, anything.
I am trying to use FB.UI to "Publish a story to the feed" from my site. That is working fine.
My problem is that I want to add a video instead of a photo. So based on the FB DEV docs, I am trying to use the "source" property to do this. But I have tried multiple video formats to no avail (avi, mp4, flv). The only thing that does seem to work is a SWF file but I do not have the video in that format. (tried to do that also but don't have the right tools)
Does anyone know if you have to use SWF or can you use another format and I am doing it wrong.
You can see my progress here http://www.thishope.org/facebook-tab.html (click on "get a free song" to get the dialog box.)
This is the code from my page
<html>
<head>
<title>This Hope</title>
<link href="http://www.thishope.org/this-hope-fb-style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : '244237565620746',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'http://WWW.MYDOMAIN.COM/channel.html', // channel.html file
oauth : true // enable OAuth 2.0
});
</script>
<div id="fb-link">
<script type="text/javascript">
function newInvite(){
FB.ui({ method: 'feed',
message: 'Get A Free Song!',
source:'http://www.thishope.org/FB-Only-One-Lord.mp4',
name:'Get A Free Song By This Hope!',
caption:'Only One Lord',
description:'Click share to post on your wall and download the song',
});
}
</script>
Get A Free Song!
</div>
</body>
</html>
Could you not host a flash video player like flowplayer?
I know it supports FLV, not sure about other formats, you may need to convert to FLV server side first
You can then attach the SWF URL to your post, which will have the advantage of the video being playable right inside Facebook's news feed
Check this sample page's source: http://sdoyle.fbdublin.com/tests/tasks/632942.html
The meta tags on this page, when detected by Facebook (via a share or Like), render the flowplayer video player right into the news feed post, and flowplayer knows which video to play via the configuration passed to it as a parameter.
I know it's not exactly what you're trying to do, but should give you the right idea for your video.
You should be able to embed in the same manner by using the source parameter for the Feed Dialog to specify a flash player for your content