AMP integration

Modifié le  Jeu, 11 Févr., 2021 à 3:50 H

Qiota provide to use script in amp technologie with amp-script tag adn the required script in head meta.                        
<head>
<script async custom-element= "amp-script" src= "https://cdn.ampproject.org/v0/amp-script-0.1.js" ></script> 
</head>

                                                           

To use a remote cross domain script the first step is to get hash code to autorize parsing qiota script in amp technologie 

   

<head>
<meta name=" amp-script-src " content= "sha384-fake_hash_of_remote_js" > 
</head>


 To get valide SHA384 hash code you need to call by CURL for exemple the api endpoint : 

Once you have integrate hash script you can set html qiota tag like as web integration :                        

  1. Put your content that you want protect by paywall into div block like this exemple                                                
  2. Set div qiota class and it will be populated from script  qiota-amp.js                                                 


...
<amp-script src=" https://www.qiota.com/assets/tokenPartner/qiota-amp.js" layout="responsive" height="700" width="350" > 
<data data-q-resource-uri="uri-current-article" data-tags="payant, autre-tags" data-fixed-trim="300"></data>
...
<div class= "qiota" ></div>
<div class= "qiota_reserve" >

//your content here whit HTML elements </div>
</amp-script>


    

Cet article a-t-il été utile ?

C'est super !

Merci pour votre commentaire

Désolé ! Nous n'avons pas pu vous être utile

Merci pour votre commentaire

Dites-nous comment nous pouvons améliorer cet article !

Sélectionner au moins l'une des raisons
La vérification CAPTCHA est requise.

Commentaires envoyés

Nous apprécions vos efforts et nous allons corriger l'article