mardi 23 août 2016

Ember.js async Widget not getting indexed by google

We've made a "Journal-Widget" for our costumer, which is in the end only a short code-snippet like that one from google analytics and looks like:

<div id="t17-voucher">
<noscript><p>Unsere Gutscheine konnten leider nicht korrekt geladen werden, da Ihr Browser kein Javascript unterstützt.</p></noscript>
</div>
<script>
(function (w,d,u,f,s,fs)    {w['t17CouponWidgetObject']=f;w[f]=w[f]||function() {
(w[f].q=w[f].q||[]).push(arguments);},s=d.createElement('script'),
fs=d.getElementsByTagName('script')    [0];s.async=1;s.src=u;fs.parentNode.insertBefore(s,fs);
})(window, document, 'http://ift.tt/2bdwS2o', 't17Voucher');
t17Voucher('create', 'u3zy1nu9', 'de', 'testhotel-post');
</script>    

This snippet gets posts from our api and displays them as a widget. So our customers have a nice, fast way to integrate a blog in their website.

But we are not able to get the detail-links of the posts, which gets generated by that ember-widget, indexed by google. As you can see the widget does have normal links something like: /query-params?post=slug and not some hash-links or hashbangs.

I guess the posts-request to our api takes to long and so google thinks the website is fully loaded and does not wait for our widget to finish render, or the problem is that all is async.

In google webmasters the widget is getting rendered correctly if i let him test the website with render:

enter image description here

Due to the deprecation of google hashbang we are not gonna use it.

We know we could use the noscript tag like a lot of ember-websites (like the discuss-ember forum) but if the problem is the async api request that would not fix our issue, because we would need to make the same request and add links to the noscript-tag dynamicly.

Test-Site

Hopefully I described it well and someone knows the solution.




Aucun commentaire:

Enregistrer un commentaire