G
G
Gentimchenko2015-02-10 20:21:32
HTML
Gentimchenko, 2015-02-10 20:21:32

How to make star rating in google snippet for HTML website?

I have a website in html+css. Some pages contain mini-games. Under the games, I want to make a rating in the form of stars, which would be displayed in the google snippet. Ideally, it should be "working", i.e. respond to user clicks and count the number of voters.
I know that there are Rating widget services (for wordpress) or graddit.com (for blog platforms and html), but as far as I understand, the latter does not have a ready-made solution for displaying ratings in a snippet?
If it is difficult to make a working one with the help of third-party services, then what is the best way to make a "imitation" of the rating so that it is shown in the snippet?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gentimchenko, 2015-02-11
@Gentimchenko

Since no one knows.
rating-widget.com suggests inserting the following code:

<script type="text/javascript">(function(d, t, e, m){
        // Async Rating-Widget initialization.
    window.RW_Async_Init = function(){
                
        RW.init({
            huid: "xxxxxxx",
            uid: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            source: "website",
            options: {
                "size": "medium",
                "style": "oxygen"
            } 
        });
        RW.render();
    };
        // Append Rating-Widget JavaScript library.
    var rw, s = d.getElementsByTagName(e)[0], id = "rw-js",
        l = d.location, ck = "Y" + t.getFullYear() + 
        "M" + t.getMonth() + "D" + t.getDate(), p = l.protocol,
        f = ((l.search.indexOf("DBG=") > -1) ? "" : ".min"),
        a = ("https:" == p ? "secure." + m + "js/" : "js." + m);
    if (d.getElementById(id)) return;              
    rw = d.createElement(e);
    rw.id = id; rw.async = true; rw.type = "text/javascript";
    rw.src = p + "//" + a + "external" + f + ".js?ck=" + ck;
    s.parentNode.insertBefore(rw, s);
    }(document, new Date(), "script", "rating-widget.com/"));</script>

and together with the output of the rating:
Is it possible to somehow mark up to stuff it into the snippet?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question