Skip to content

Commit

Permalink
feat(gtag): analytic script for IPFS deliver
Browse files Browse the repository at this point in the history
resolve #77
  • Loading branch information
49659410+tx0c committed Sep 21, 2022
1 parent 6030587 commit f1190fd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const cid = await ipfs.dag.put(metaData, {
hashAlg: "sha2-256",
})
// this is the final media hash used in the end of article url at matters.news
const mediaHash = cid.toBaseEncodedString()
const mediaHash = cid.toV1().toString() // cid.toBaseEncodedString()
```

## Unit test
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@matters/matters-html-formatter",
"version": "0.0.9",
"version": "0.0.10",
"description": "Format HTML string before publish to IPFS or ISCN",
"author": "https://github.com/thematters",
"homepage": "https://github.com/thematters/matters-html-formatter",
Expand Down
4 changes: 4 additions & 0 deletions src/makeHtmlBundle/formatHTML/articleTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ ${readMore ? /*html*/ `
}
</main>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-K4KK55LL24"></script>
<script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date); gtag('config', 'G-K4KK55LL24'); </script>
</body>
</html>
`
Expand Down

0 comments on commit f1190fd

Please sign in to comment.