Info
Content

Werken met Twitter

Twittercodes zijn een beetje speciaal in die zin dat ze een statisch en een dynamisch deel bevatten. Pas de wijzigingen in de volgende codes toe om Twitter-codes te blokkeren.

Tweets insluiten

Originele code voor wijzigingen:

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">[IAB TCF V2] <br><br>What are the benefits of implementing <a href="https://twitter.com/hashtag/TCF?src=hash&amp;ref_src=twsrc%5Etfw">#TCF</a> V2? <br><br>For publishers: <br><br>⚒️ Greater control<br>🏗️ Provides a technical solution for how to collect and transfer <a href="https://twitter.com/hashtag/personaldata?src=hash&amp;ref_src=twsrc%5Etfw">#personaldata</a> for digital advertising. <br><br>Find out all the benefits: <a href="https://t.co/nWyWAEnSWN">https://t.co/nWyWAEnSWN</a><a href="https://twitter.com/hashtag/GDPR?src=hash&amp;ref_src=twsrc%5Etfw">#GDPR</a> <a href="https://t.co/BHAvirWTCp">pic.twitter.com/BHAvirWTCp</a></p>&mdash; IAB Europe (@IABEurope) <a href="https://twitter.com/IABEurope/status/1288439132319100929?ref_src=twsrc%5Etfw">July 29, 2020</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

Nieuwe code na wijzigingen

<blockquote class="twitter-tweet cmplazyload" data-cmp-hide="1" data-cmp-vendor="s34" ><p lang="en" dir="ltr">[IAB TCF V2] <br><br>What are the benefits of implementing <a href="https://twitter.com/hashtag/TCF?src=hash&amp;ref_src=twsrc%5Etfw">#TCF</a> V2? <br><br>For publishers: <br><br>⚒️ Greater control<br>🏗️ Provides a technical solution for how to collect and transfer <a href="https://twitter.com/hashtag/personaldata?src=hash&amp;ref_src=twsrc%5Etfw">#personaldata</a> for digital advertising. <br><br>Find out all the benefits: <a href="https://t.co/nWyWAEnSWN">https://t.co/nWyWAEnSWN</a><a href="https://twitter.com/hashtag/GDPR?src=hash&amp;ref_src=twsrc%5Etfw">#GDPR</a> <a href="https://t.co/BHAvirWTCp">pic.twitter.com/BHAvirWTCp</a></p>&mdash; IAB Europe (@IABEurope) <a href="https://twitter.com/IABEurope/status/1288439132319100929?ref_src=twsrc%5Etfw">July 29, 2020</a></blockquote>
<script type="text/plain" class="cmplazyload" data-cmp-preview="500x700" data-cmp-vendor="s34" async data-cmp-src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

De volgende wijzigingen zijn aangebracht:

  • Voeg CSS-klasse toe cmplazyload naar <blockquote ...>
  • Toevoegen data-cmp-hide="1" data-cmp-vendor="s34" naar <blockquote ...>
  • Toevoegen type="text/plain" class="cmplazyload" data-cmp-preview="500x700" data-cmp-vendor="s34" naar <script ...> en pas de hoogte / breedte naar wens aan (bijv. verander 500x700 in 300x300)
  • Veranderen src="..." naar data-cmp-src="..." in <script ...>

Tijdlijnen insluiten

<a class="twitter-timeline"
  href="https://twitter.com/consentmanager"
  data-width="300"
  data-height="300">
Tweets by @consentmanager
</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

Nieuwe code na wijzigingen:

<a class="twitter-timeline cmplazyload"
  href="https://twitter.com/consentmanager"
  data-width="300"
  data-height="300"
  data-cmp-hide="1"
  data-cmp-vendor="s34" 
   >
Tweets by @consentmanager
</a>
<script type="text/plain" class="cmplazyload" data-cmp-preview="500x700" data-cmp-vendor="s34" async data-cmp-src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 
Terug naar boven