Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@tincre/promo-sync-gtag
Advanced tools
Readme
.dev
Event tracking for Google Tag Manager via Promo ads. Use in conjunction with the promo-button
, your Google Tag Manager and/or Google Analytics and Tincre Promo.
🤯 for your ads on the web, with Google.
Use your favorite package manager to rock installation of promo-sync-gtag
.
yarn add @tincre/promo-sync-gtag # -D if you want this as a dev dep
npm install @tincre/promo-sync-gtag # --save-dev if you want it as a dev dep
As high as possible in the <head>
tag on each page of your site add the following:
import { promoGtag } from '@tincre/promo-sync-gtag';
<script type="module" src="https://unpkg.com/browse/@tincre/promo-sync-gtag@0.0.3/dist/promo-sync-gtag.esm.js">
import { loadPromoGtag } from '@tincre/promo-sync-gtag';
loadPromoGtag();
</script>
As usual you can grab our minified build and link to that as a universal script, loaded prior to the code snippet directly above (and without the import
statement).
As we at Tincre are proud Next.js users, below is a snippet you can use for performant Next.js sites.
In your pages/_app.{js,jsx,ts,tsx}
file:
import Script from 'next/script';
import { promoGtag } from '@tincre/promo-sync-gtag';
export default function MyApp({component, pageProps,}) {
return (
<>
<Script id="google-tag-manager" strategy={"afterInteractive"}>{promoGtag}</Script>
<Component {...pageProps} />
</>
)
}
To use a Google Tag (Analytics) event simply import it into your framework of choice and fire the function.
🌶️ Typically this is in a
useEffect
hook within the function body if you're a React user.
import { promoEventPageView } from '@tincre/promo-sync-gtag';
export default function PageOrComponent() {
promoEventPageView()
return <></>;
}
useEffect
exampleimport { useEffect } from 'react';
import { promoEventPageView } from '@tincre/promo-sync-gtag';
export default function PageOrComponent() {
useEffect(() => {
promoEventPageView()
}, [])
return <></>;
}
This code is free to use for your commercial or personal projects. It is open-source licensed under the Mozilla Public License 2.0.
You will see various headers throughout the codebase and can reference the license directly via LICENSE herein.
We use npm
for releases. In particular, we use
npm --publish
to get the job done.
Currently, only @thinkjrs has the ability to release. The following section is written for memory.
Prior to using npm --publish
a release tag needs to be created for
the library using our standard tagging practices.
Ensure that tests :white_check_mark: pass during this process prior to releasing via npm.
To do a proper release, ensure you're in the base repo directory and run
npm publish . --access public --dry-run
.
latest
tagTo complete a full release to the latest
npm dist-tag
, ensure you're in
the base repo directory and run npm publish . --access public
.
:tada: That's it! :tada:
FAQs
Event tracking for Google Tag Manager via Promo ads. Use in conjunction with the [`promo-button`](https://github.com/Tincre/promo-button), your Google Tag Manager and/or Google Analytics and [Tincre Promo](https://tincre.dev/promo').
The npm package @tincre/promo-sync-gtag receives a total of 2 weekly downloads. As such, @tincre/promo-sync-gtag popularity was classified as not popular.
We found that @tincre/promo-sync-gtag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.