小编coc*_*d'3的帖子

如何将 gtag.js 添加到 react.js/next.js index.js?

我很抱歉这个菜鸟问题,我刚开始使用 next.js 模板表单https://github.com/zeit/next.js/tree/canary/examples/hello-world/pages 通常我只会添加 gtag .js 到 index.html 但对于这个 next.js 只有 index.js。问题是我怎么能包括这个?我曾尝试将 gtag 作为组件并尝试导入它并包含脚本,因为它在 index.js 的渲染函数中,但到目前为止它不起作用!请帮我!

标签:

 <script async src="https://www.googletagmanager.com/gtag/js? 
   id=GA_TRACKING_ID"></script>
    <script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'GA_TRACKING_ID');
</script>
Run Code Online (Sandbox Code Playgroud)

索引.js:

import Link from 'next/link'
export default () => (
  <div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
Run Code Online (Sandbox Code Playgroud)

javascript next.js gtag.js

5
推荐指数
1
解决办法
1万
查看次数

找不到错误!! 尝试循环遍历字符串并将小写字母更改为x86汇编语言中的大写字母

section .data   
  msg db  "sum of x and y is " ;String
section .text
global _start
_start:
Change_letter:
  mov ECX, -1 ;set counter 
  mov ESI, [msg] ; move string address to ESI
  mov Eax , 32 ; mov 32 to eax for change lowercase to uppercase
startloop:
  inc ecx  ; 
  cmp byte [ESI+ecx], 0x00 ;compare with null 
  jne end
  cmp byte [ESI+ECX], 0x61 ; compare with lower bound of lowercase 
  jl startloop
  cmp byte [ESI+ECX], 0x7A
  jg startloop
  add byte …
Run Code Online (Sandbox Code Playgroud)

x86 assembly nasm

-4
推荐指数
1
解决办法
45
查看次数

标签 统计

assembly ×1

gtag.js ×1

javascript ×1

nasm ×1

next.js ×1

x86 ×1