diff --git a/package-lock.json b/package-lock.json index df47d4b..963f457 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,19 @@ { "name": "@phntms/next-gtm", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@phntms/next-gtm", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", + "dependencies": { + "@phntms/react-gtm": "^0.0.5" + }, "devDependencies": { "@babel/preset-env": "^7.4.5", "@babel/preset-typescript": "^7.3.3", - "@phntms/react-gtm": "^0.0.5", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^5.0.3", "@types/jest": "^26.0.20", @@ -1962,7 +1964,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/@phntms/react-gtm/-/react-gtm-0.0.5.tgz", "integrity": "sha512-v/Pchgdy3IFJm+7Yo5gNMxIm3Obc9G30Zl2kfqAe+JfMetsDIQUHp8ZiKiTwm7v25is+rab/naL7tamWqPymNg==", - "dev": true, "peerDependencies": { "react": ">=16.8.0" } @@ -8265,8 +8266,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -8530,7 +8530,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -9366,7 +9365,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -10186,7 +10184,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -14423,7 +14420,6 @@ "version": "0.0.5", "resolved": "https://registry.npmjs.org/@phntms/react-gtm/-/react-gtm-0.0.5.tgz", "integrity": "sha512-v/Pchgdy3IFJm+7Yo5gNMxIm3Obc9G30Zl2kfqAe+JfMetsDIQUHp8ZiKiTwm7v25is+rab/naL7tamWqPymNg==", - "dev": true, "requires": {} }, "@sinonjs/commons": { @@ -19531,8 +19527,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -19750,7 +19745,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, "requires": { "js-tokens": "^3.0.0 || ^4.0.0" } @@ -20442,8 +20436,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", @@ -21093,7 +21086,6 @@ "version": "17.0.2", "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" diff --git a/package.json b/package.json index 1a9dac3..20b9787 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@phntms/next-gtm", "description": "A lightweight Next library to implement custom Google Tag Manager events.", - "version": "0.0.1", + "version": "0.0.2", "main": "lib/index.js", "types": "lib/index.d.ts", "homepage": "https://github.com/phantomstudios/next-gtm#readme", @@ -48,7 +48,6 @@ "devDependencies": { "@babel/preset-env": "^7.4.5", "@babel/preset-typescript": "^7.3.3", - "@phntms/react-gtm": "^0.0.5", "@testing-library/react": "^11.2.5", "@testing-library/react-hooks": "^5.0.3", "@types/jest": "^26.0.20", @@ -73,5 +72,8 @@ "react-test-renderer": ">=17.0.2", "ts-jest": "^26.1.0", "typescript": "^4.1.5" + }, + "dependencies": { + "@phntms/react-gtm": "^0.0.5" } } diff --git a/src/components/TrackingHeadScript.tsx b/src/components/TrackingHeadScript.tsx index b405bed..fe2584c 100644 --- a/src/components/TrackingHeadScript.tsx +++ b/src/components/TrackingHeadScript.tsx @@ -1,9 +1,8 @@ import React from "react"; +import { EmbedTrackingProps } from "@phntms/react-gtm"; import Script from "next/script"; -import { EmbedTrackingProps } from "../types"; - const TrackingHeadScript = ({ id }: EmbedTrackingProps) => ( <> {id && ( diff --git a/src/types.tsx b/src/types.tsx deleted file mode 100644 index f351296..0000000 --- a/src/types.tsx +++ /dev/null @@ -1,13 +0,0 @@ -export interface EmbedTrackingProps { - id?: string; -} - -export interface EventTrackingProps { - event?: string; - data?: EventDataProps; -} - -export interface EventDataProps { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [key: string]: any; -}