首页 > 解决方案 > 如何将 Vue/NuxtJs 与 Ezoic 集成?

问题描述

Ezoic 为网络发布商提供针对其广告、内容、布局等的自动化网站智能。

Ezoic 只能由 Cloudflare 或名称服务器集成 - https://support.ezoic.com/support/solutions/articles/48000453862-how-can-i-integrate-my-site-with-ezoic-

ezoic 服务器正在用广告脚本替换广告占位符。

例子:

<span id="ezoic-pub-ad-placeholder-100"></span> ---> ad script

问题是如何将它与 NuxtJS 和 Vue 连接起来。水合后,广告脚本被移除并替换为占位符。我可以告诉 Vue - 不要重新渲染那段代码吗?

组件代码:

<template>
    <div class="google-ads" :class="`google-ads--${type}`">
        <template v-if="type === 'top'">
            <!-- Ezoic - standard - top_of_page -->
            <div id="ezoic-pub-ad-placeholder-102"></div>
            <!-- End Ezoic - standard - top_of_page -->
        </template>
    </div>
</template>

标签: javascriptvue.jsnuxt.jsserver-side-renderingvirtual-dom

解决方案


推荐阅读