Skip to content

Commit

Permalink
docs: add required configuration options for integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
axe312ger committed Jan 4, 2024
1 parent 6986892 commit dabc49b
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/docs/docs/integrations/google-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The Google Analytics integration leverages the [`react-ga`](https://www.npmjs.co

<IntegrationProfile integration={googleAnalyticsIntegration({})} />

## Configuration Options

* trackingId: Your Google Analytics tracking ID

## `getGoogleAnalytics` Function

The `getGoogleAnalytics` function retrieves the initialized instance of [`react-ga`](https://www.npmjs.com/package/react-ga). This allows for direct interactions with Google Analytics tracking features within your application.
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/docs/integrations/google-tag-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The Google Tag Manager integration uses the [`react-gtm-module`](https://www.npm
<IntegrationProfile integration={googleTagManagerIntegration({})} />

## Configuration Options

* gtmId: Your Google Tag Manager ID

## `getGoogleTagManager` Function

The `getGoogleTagManager` function provides access to the initialized instance of [`react-gtm-module`](https://www.npmjs.com/package/react-gtm-module). This allows for the integration and management of Google Tag Manager functionalities within your application.
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/docs/integrations/hubspot.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The HubSpot integration with Consent Manager will directly inject the HubSpot tr

<IntegrationProfile integration={hubspotIntegration({})} />

## Configuration Options

* hubId: Your Hubspot ID

## Example Usage with `react-router`

This example demonstrates how to use hubspot in conjunction with `react-router` to track page views:
Expand Down
6 changes: 5 additions & 1 deletion packages/docs/docs/integrations/linkedin.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ import { linkedinIntegration } from "@consent-manager/integration-linkedin"

The LinkedIn integration with Consent Manager directly injects the LinkedIn tracking script (Insight Tag) into your application once the user consents. The LinkedIn Insight Tag enables tracking of website visitors for analytics and ad targeting purposes. For more information about the LinkedIn Insight Tag, you can refer to [LinkedIn's official page](https://business.linkedin.com/marketing-solutions/insight-tag).

<IntegrationProfile integration={linkedinIntegration({})} />
<IntegrationProfile integration={linkedinIntegration({})} />

## Configuration Options

* partnerId: Your LinkedIn Partner ID
5 changes: 5 additions & 0 deletions packages/docs/docs/integrations/matomo.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Ensure your [Matomo instance is privacy-aware](https://matomo.org/cookie-consent

<IntegrationProfile integration={matomoPrivacyAwareIntegration({})} />

## Configuration Options

* matomoURL: The URL of your Matomo installation
* siteID: ID of the page set up in Matomo

## Tracking API

The Matomo integration exposes a tracking API with functions to simplify page view and event tracking. The `getMatomoTracker` function provides methods such as `trackPageViewSPA` for single-page applications and `trackEvent` for event tracking.
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/docs/integrations/segment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The Segment integration in Consent Manager manages user consent for the Segment
<IntegrationProfile integration={segmentIntegration({})} />

## Configuration Options

* writeKey: Your Segment write key.

## `getSegment` Function

The `getSegment` function provides access to the initialized Segment instance. This enables you to interact with Segment's tracking functionalities within your application.
Expand Down
6 changes: 0 additions & 6 deletions packages/docs/docs/new-structure.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@


- integrations
- DONE - make more examples on how to track with certain integrations (for example matomo track events, page view and so on)
- make sure all config options are listed

- other todos
- actively ask for co contributors in readme and on website
- when linking hashbite, also offer payed services on a hourly rate
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-google-tag-manager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const WrapperComponent: React.FC = () => {
// @todo required options are not yet possible.
// See: https://github.com/hashbite/consent-manager/issues/19
interface googleTagManagerConfig extends IntegrationConfigOptions {
trackingId?: string // @todo this should be required
gtmId?: string // @todo this should be required
}

export function googleTagManagerIntegration(
Expand Down

0 comments on commit dabc49b

Please sign in to comment.