### Start an Experiment Source: https://docs.oursprivacy.com/docs/platform-api/experiments This example shows how to start an experiment using a POST request. The `publishAfterStart` parameter controls whether the experiment is published immediately. ```cURL curl -X POST "https://app.oursprivacy.com/rest/v1/experiments/string/start" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "publishAfterStart": true }' ``` -------------------------------- ### Install Go SDK Source: https://docs.oursprivacy.com/docs/go Install the SDK using go get. Visit the Go package repository or Github Repo for more details. ```bash go get github.com/with-ours/ingest-sdk-go ``` -------------------------------- ### Example Configuration: Minimal Setup Source: https://docs.oursprivacy.com/docs/translate/configuration A minimal translation widget configuration including position, theme, brand color, widget variant, modal variant, and a limited set of languages. ```text Position: bottom-left Theme: dark Brand Color: #333333 Widget Variant: minimal Modal Variant: dropdown Languages: en, es, fr ``` -------------------------------- ### Experiment Start Response Source: https://docs.oursprivacy.com/docs/platform-api/experiments Example response when an experiment is successfully started. Includes experiment details and status. ```JSON { "publishStatus": "pending_publish", "concurrentVersionChanges": 1, "experiment": { "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E", "key": "homepage-hero-headline-test", "name": "Homepage Hero Headline Test", "description": "Test whether benefit-led copy increases demo requests.", "type": "ab", "status": "completed", "createdAt": "2026-04-30T18:42:11.219Z", "updatedAt": "string", "startedAt": "string", "stoppedAt": "string", "trafficAllocation": 100, "includeQueryString": false, "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8", "targetingRules": { "urlPatterns": [ "/pricing*", "/enterprise" ], "audienceId": "string", "visitorProperties": {}, "visitorStatus": "string", "queryParams": [ { "key": "utm_campaign", "operator": "contains", "value": "spring-launch" } ] }, "metrics": { "primary": {}, "secondary": [ { "eventName": "demo_requested", "funnelId": "string" } ] } } } ``` -------------------------------- ### Create Destination Example Source: https://docs.oursprivacy.com/docs/platform-api This example demonstrates how to create a new destination. ```APIDOC ## POST /rest/v1/destinations ### Description Creates a new destination. ### Method POST ### Endpoint https://app.oursprivacy.com/rest/v1/destinations ### Parameters #### Request Body - **name** (string) - Required - The name of the destination. - **type** (string) - Required - The type of the destination (e.g., "google_analytics"). - **config** (object) - Optional - Configuration specific to the destination type. ### Request Example ```json { "name": "My New GA Destination", "type": "google_analytics", "config": { "tracking_id": "UA-XXXXX-Y" } } ``` ### Response #### Success Response (201) - **data** (object) - The newly created destination object. - **id** (string) - The unique identifier for the destination. - **name** (string) - The name of the destination. - **type** (string) - The type of the destination. - **config** (object) - The configuration of the destination. - **created_at** (string) - The timestamp when the destination was created. - **updated_at** (string) - The timestamp when the destination was last updated. #### Response Example ```json { "data": { "id": "dest_abcdef", "name": "My New GA Destination", "type": "google_analytics", "config": { "tracking_id": "UA-XXXXX-Y" }, "created_at": "2023-10-27T11:00:00Z", "updated_at": "2023-10-27T11:00:00Z" } } ``` ``` -------------------------------- ### Suggest API Request Example Source: https://docs.oursprivacy.com/docs/maps/location-apis Demonstrates how to make a POST request to the Suggest API to get location recommendations. Ensure the 'Content-Type' header is set to 'application/json'. ```javascript const apiKey = 'YOUR-API-KEY-HERE'; const suggestUrl = `https://cdn.oursprivacy.com/location-services/v2/suggest?key=${apiKey}`; const suggestions = await fetch(suggestUrl, { method: 'POST', headers: { accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({ QueryText: 'medical', BiasPosition: [-118.2437, 34.0522], MaxResults: 8, }), }); const suggestionData = await suggestions.json(); ``` -------------------------------- ### Start Experiment Source: https://docs.oursprivacy.com/docs/platform-api/experiments Starts an experiment. Optionally, you can publish the experiment and its variants atomically after starting. ```APIDOC ## POST /rest/v1/experiments/{id}/start ### Description Starts an experiment. Optionally publishes changes. ### Method POST ### Endpoint /rest/v1/experiments/{id}/start ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the experiment to start. #### Request Body `application/json` - **publishAfterStart** (boolean) - Optional - If true (default), atomically publishes the experiment and its variants. If false, stages the change without publishing. ### Response #### Success Response (200) Indicates the experiment has been started. The response body may vary depending on whether publishing was included. ### Response Example (Example response structure not fully detailed in source, but typically indicates success or pending publish status.) ```json { "status": "started", "published": true } ``` ``` -------------------------------- ### NPM Package Installation and Initialization Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Install the SDK using npm or yarn for modern JavaScript frameworks. Initialize the SDK once per application startup with your token. ```bash npm install @oursprivacy/cdp-sdk # or yarn add @oursprivacy/cdp-sdk ``` ```javascript import ours from '@oursprivacy/cdp-sdk'; // Initialize once per application startup // In SPAs, this means once when the app loads - routing doesn't require re-initialization ours.init('YOUR_TOKEN'); // Define function to track purchase events (call onPurchase() when purchase happens) function onPurchase() { ours.track('Purchase Completed', { value: 1000 }); } ``` -------------------------------- ### Install Go Platform SDK Source: https://docs.oursprivacy.com/docs/platform-go Use this command to install the latest version of the Ours Privacy Go platform SDK. ```bash go get -u 'github.com/with-ours/platform-sdk-go@latest' ``` -------------------------------- ### Install Node.js SDK Source: https://docs.oursprivacy.com/docs/nodejs Install the SDK via npm. This is the first step to integrating the Ours Privacy Node.js SDK. ```bash npm install @oursprivacy/server-sdk ``` -------------------------------- ### Install Node.js Platform SDK Source: https://docs.oursprivacy.com/docs/platform-nodejs Install the Ours Privacy Node.js platform SDK using npm. ```bash npm install @oursprivacy/platform-sdk ``` -------------------------------- ### Install Ours Privacy CLI with Go Source: https://docs.oursprivacy.com/docs/platform-cli Install the Ours Privacy CLI using the Go command-line tool. ```go go install 'github.com/with-ours/platform-cli/cmd/oursprivacy@latest' ``` -------------------------------- ### Install Ours Privacy CLI with Homebrew Source: https://docs.oursprivacy.com/docs/platform-cli Use Homebrew to tap the Ours Privacy repository and install the CLI. ```bash brew tap with-ours/tap brew install oursprivacy ``` -------------------------------- ### Install Ours Privacy Python SDK Source: https://docs.oursprivacy.com/docs/python Install the SDK using pip. Visit the PyPi repository or Github Repo for more details. ```bash pip install oursprivacy-client ``` -------------------------------- ### Start Experiment Source: https://docs.oursprivacy.com/docs/platform-api/experiments Initiates an A/B test experiment. This endpoint starts the experiment and begins tracking user interactions. ```APIDOC ## POST /rest/v1/experiments/string/start ### Description Starts an experiment. ### Method POST ### Endpoint /rest/v1/experiments/{id}/start ### Authorization `apiKey` Authorization: Bearer Ours Privacy API key In: `header` ### Path Parameters - **id** (string) - Required - The ID of the experiment to start. ### Request Body `application/json` - **winnerVariantId** (string) - Optional - The ID of the winning variant to persist when completing the experiment. ### Request Example ```json { "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8" } ``` ### Response #### Success Response (200) `application/json` - **publishStatus** (string) - The status of the publish operation. - **concurrentVersionChanges** (integer) - The number of concurrent version changes. - **experiment** (object) - Details of the experiment. - **id** (string) - The unique identifier for the experiment. - **key** (string) - A unique key for the experiment. - **name** (string) - The name of the experiment. - **description** (string) - A description of the experiment. - **type** (string) - The type of experiment (e.g., 'ab'). - **status** (string) - The current status of the experiment. - **createdAt** (string) - The timestamp when the experiment was created. - **updatedAt** (string) - The timestamp when the experiment was last updated. - **startedAt** (string) - The timestamp when the experiment started. - **stoppedAt** (string) - The timestamp when the experiment stopped. - **trafficAllocation** (integer) - The percentage of traffic allocated to the experiment. - **includeQueryString** (boolean) - Whether to include query strings in URL matching. - **winnerVariantId** (string) - The ID of the winning variant. - **targetingRules** (object) - Rules for targeting users for the experiment. - **urlPatterns** (array) - Array of URL patterns to match. - **audienceId** (string) - The ID of the audience to target. - **visitorProperties** (object) - Visitor properties for targeting. - **visitorStatus** (string) - Visitor status for targeting. - **queryParams** (array) - Array of query parameters for targeting. - **key** (string) - The query parameter key. - **operator** (string) - The comparison operator. - **value** (string) - The value to compare against. - **metrics** (object) - Metrics to track for the experiment. - **primary** (object) - The primary metric. - **secondary** (array) - Array of secondary metrics. - **eventName** (string) - The name of the event to track. - **funnelId** (string) - The ID of the funnel associated with the event. ### Response Example ```json { "publishStatus": "pending_publish", "concurrentVersionChanges": 1, "experiment": { "id": "exp_01HZX8TK6TSN91C5XWZP3N1M4E", "key": "homepage-hero-headline-test", "name": "Homepage Hero Headline Test", "description": "Test whether benefit-led copy increases demo requests.", "type": "ab", "status": "completed", "createdAt": "2026-04-30T18:42:11.219Z", "updatedAt": "string", "startedAt": "string", "stoppedAt": "string", "trafficAllocation": 100, "includeQueryString": false, "winnerVariantId": "var_01HZX8YJH3Z3W1R2Q4M5N6P7Q8", "targetingRules": { "urlPatterns": [ "/pricing*", "/enterprise" ], "audienceId": "string", "visitorProperties": {}, "visitorStatus": "string", "queryParams": [ { "key": "utm_campaign", "operator": "contains", "value": "spring-launch" } ] }, "metrics": { "primary": {}, "secondary": [ { "eventName": "demo_requested", "funnelId": "string" } ] } } } ``` ``` -------------------------------- ### Install Web SDK via npm Source: https://docs.oursprivacy.com/docs/client-overview Install the Web SDK using npm for use in your project. This is one of the methods for integrating the SDK into your web application. ```bash npm install @oursprivacy/cdp-sdk ``` -------------------------------- ### Embedding the Install Tag in HTML Source: https://docs.oursprivacy.com/docs/tag-manager/installation Paste the install tag into the `` section of your HTML, preferably just before the closing `` tag. Ensure this is added to every page where tracking is desired. ```html Your Website ``` -------------------------------- ### Install C# SDK using NuGet Source: https://docs.oursprivacy.com/docs/csharp Install the Ours Privacy C# SDK using the dotnet CLI. Visit the NuGet package or Github Repo for more details. ```bash dotnet add package OursPrivacy ``` -------------------------------- ### Quick Start: Initialize and Track Events Source: https://docs.oursprivacy.com/docs/react-native-sdk Initialize the SDK with your token and track a basic 'App Opened' event. Ensure to call flush() to send events immediately. ```javascript import { OursPrivacy } from '@oursprivacy/react-native'; const oursprivacy = new OursPrivacy('YOUR_TOKEN', false); await oursprivacy.init(false, { default_event_properties: { app_version: '1.0.0' }, default_user_custom_properties: { subscription_tier: 'free' }, }); oursprivacy.track('App Opened'); oursprivacy.flush(); ``` -------------------------------- ### Basic SDK Initialization, Identification, and Event Tracking Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Demonstrates the fundamental steps of initializing the SDK with a token, identifying a user with custom properties, and tracking a custom event. ```javascript // Initialize ours('init', 'YOUR_TOKEN'); // Identify user ours('identify', { email: 'user@example.com' }); // Track a custom event ours('track', 'Form Submitted', { form_name: 'newsletter' }); ``` -------------------------------- ### Autocomplete API Request Example Source: https://docs.oursprivacy.com/docs/maps/location-apis Demonstrates how to make a POST request to the Autocomplete API to get address and place suggestions. Ensure to replace YOUR-API-KEY-HERE with your actual API key. ```javascript const apiKey = 'YOUR-API-KEY-HERE'; const endpoint = `https://cdn.oursprivacy.com/location-services/v2/autocomplete?key=${apiKey}`; const requestBody = { QueryText: 'green bay', BiasPosition: [-88.0198, 44.5192], MaxResults: 5, Filter: { IncludeCountries: ['USA'], }, }; const response = await fetch(endpoint, { method: 'POST', headers: { accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify(requestBody), }); const results = await response.json(); ``` -------------------------------- ### Initialize and Use Go Platform SDK Client Source: https://docs.oursprivacy.com/docs/platform-go Import the SDK with an alias (recommended: 'oursprivacy') and initialize the client with your API key. This example demonstrates listing sources. ```go package main import ( "context" "fmt" oursprivacy "github.com/with-ours/platform-sdk-go" "github.com/with-ours/platform-sdk-go/option" ) func main() { client := oursprivacy.NewClient( option.WithAPIKey("YOUR_API_KEY"), // defaults to os.LookupEnv("OURS_PRIVACY_API_KEY") ) sources, err := client.Sources.List(context.TODO()) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", sources.Entities) } ``` -------------------------------- ### Initialize Ours Privacy via Script Tag Source: https://docs.oursprivacy.com/docs/vite-react-router-integration For simpler setups, initialize Ours Privacy by pasting your provided snippet into the `` section of your `index.html` file. This method is an alternative to the NPM package installation. ```html ``` -------------------------------- ### Shopify Pixel Setup for Ours Privacy Source: https://docs.oursprivacy.com/docs/shopify This snippet should be added to your Shopify custom pixel after installing the Ours Privacy Javascript SDK. It subscribes to all standard Shopify events and tracks them using the 'ours' function. ```javascript // Step 1. Install Ours Privacy // paste your Ours install code here // Step 2. Insert this snippet analytics.subscribe('all_standard_events', (event) => { ours('track', event.name, event.data); }); ``` -------------------------------- ### Record Everything During Launch, Scale Back Later Source: https://docs.oursprivacy.com/docs/session-replay/sampling-and-triggers Set `sampleRate` to 1 to record all sessions during a launch period. This allows for comprehensive data collection, with the option to scale back to a lower sampling rate later. Critical events like 'checkout', 'signup', and 'plan_upgrade' are always captured. ```javascript session_replay: { token: 'replay_token', sampleRate: 1, // 100% — flip to 0.1 once you have enough data alwaysRecordEvents: ['checkout', 'signup', 'plan_upgrade'], } ``` -------------------------------- ### Initialize Web SDK with Experimentation Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Initialize the Web SDK with your token and enable experimentation by providing an experimentation token. ```javascript ours('init', 'YOUR_TOKEN', { experimentation: { token: 'exp_token', }, }); ``` -------------------------------- ### Successful Response Body for GET Consent Settings Source: https://docs.oursprivacy.com/docs/platform-api/consent-settings This is an example of a successful JSON response when retrieving consent settings. It outlines the structure of consent entities, including their configurations for services, categories, and regional rules. ```JSON { "entities": [ { "id": "string", "name": "string", "kind": "string", "status": "Disabled", "createdAt": "string", "updatedAt": "string", "whitelistDomains": [ "string" ], "consentCookieName": "string", "webSDKToken": "string", "customDomain": "string", "revision": 0, "skipBlockingClassNames": [ "string" ], "services": [ { "additionalCategories": [ "string" ], "category": "string", "domainPatterns": [ "string" ], "internalNotes": "string", "label": "string" } ], "categories": [ { "label": "string", "priority": 0, "value": "string" } ], "default": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] }, "regions": [ { "additionalRegions": [ "string" ], "regionCode": "US-CA", "rule": { "autoShow": true, "autoShowDismissConfig": {}, "autoShowDismissMode": "string", "autoblockUnknown": true, "categories": [ { "key": "string", "value": { "autoDisableOnGPC": true, "enabled": true, "readOnly": true, "reloadPage": true } } ], "disablePageInteraction": true, "guiOptions": {}, "hideFromBots": true, "language": "en", "mode": "opt_in", "showVendorsInPreferences": true, "translations": [ { "language": "en", "value": { "consentModal": {}, "preferencesModal": {} } } ] } } ] } ] } ``` -------------------------------- ### Example: Initialize and Update Default Event Properties Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Demonstrates initializing the SDK with initial default properties and then updating them later based on user actions or context. Subsequent events will include the merged defaults. ```javascript // Initialize with initial defaults ours('init', 'YOUR_TOKEN', { default_event_properties: { environment: 'production', }, }); // Later, update defaults based on user action or context ours('updateDefaultEventProperties', { environment: 'production', source: 'mobile_app', campaign: 'summer_sale', }); // All subsequent events will include the updated defaults ours('track', 'Purchase', { amount: 99.99 }); // This event will include: environment, source, campaign, and amount ``` -------------------------------- ### Recommended Web SDK Initialization Source: https://docs.oursprivacy.com/docs/experimentation/headless-experiments Load experimentation through the Web SDK for automatic alignment of CDP and experimentation identity. This is the recommended setup for most sites. ```javascript ours('init', 'YOUR_CDP_TOKEN', { experimentation: { token: 'YOUR_EXPERIMENT_TOKEN', }, }); ``` -------------------------------- ### Get Variant Name Source: https://docs.oursprivacy.com/docs/experimentation/javascript-sdk Get the human-readable variant name for a specific experiment. ```APIDOC ## getVariantName(experimentId) ### Description Get the human-readable variant name for a specific experiment. ### Method `getVariantName` ### Parameters #### Path Parameters - **experimentId** (string) - Required - The ID of the experiment. ### Response - **variantName** (string | null) - The human-readable name of the assigned variant, or null if not assigned. ### Request Example ```javascript const name = window.ours_experiments.getVariantName('exp_abc123'); // => "Green CTA" | "Control" | null ``` ``` -------------------------------- ### Initialize and Use Node.js Platform SDK Source: https://docs.oursprivacy.com/docs/platform-nodejs Initialize the SDK with your API key and list sources. Ensure your API key is set as an environment variable. ```javascript import OursPrivacyPlatform from '@oursprivacy/platform-sdk'; const client = new OursPrivacyPlatform({ apiKey: process.env['OURS_PRIVACY_API_KEY'], // This is the default and can be omitted }); const sources = await client.sources.list(); console.log(sources.data); ``` -------------------------------- ### List Destinations Example Source: https://docs.oursprivacy.com/docs/platform-api This example demonstrates how to list your destinations using a curl command. ```APIDOC ## GET /rest/v1/destinations ### Description Lists all available destinations. ### Method GET ### Endpoint https://app.oursprivacy.com/rest/v1/destinations ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of destinations to return. - **offset** (integer) - Optional - The number of destinations to skip before starting to collect the result set. ### Request Example ```bash curl -X GET \ 'https://app.oursprivacy.com/rest/v1/destinations?limit=10&offset=0' \ -H 'Authorization: Bearer YOUR_API_KEY' ``` ### Response #### Success Response (200) - **data** (array) - An array of destination objects. - **id** (string) - The unique identifier for the destination. - **name** (string) - The name of the destination. - **type** (string) - The type of the destination (e.g., "google_analytics"). - **created_at** (string) - The timestamp when the destination was created. - **updated_at** (string) - The timestamp when the destination was last updated. #### Response Example ```json { "data": [ { "id": "dest_12345", "name": "Google Analytics", "type": "google_analytics", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Initialize SDK with Experimentation Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Initialize the Web SDK and enable experimentation by providing your token and an experimentation token. ```APIDOC ## Initialize SDK with Experimentation ### Description Initialize the Web SDK and enable experimentation by providing your token and an experimentation token. ### Method `ours('init', 'YOUR_TOKEN', { experimentation: { token: 'exp_token' } });` ``` -------------------------------- ### Example: Update Defaults and Track Event Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Initialize the SDK, update default user custom properties, and track a subsequent event which will include the updated properties. ```javascript // Initialize SDK ours('init', 'YOUR_TOKEN'); // Update defaults when user upgrades their plan ours('updateDefaultUserCustomProperties', { plan: 'premium', subscription_tier: 'enterprise', }); // All subsequent events will include the updated user custom properties ours('track', 'Feature Used', { feature: 'advanced_analytics' }); // This event's userProperties.custom_properties will include: plan and subscription_tier ``` -------------------------------- ### Install React Native SDK Source: https://docs.oursprivacy.com/docs/react-native-sdk Install the Ours Privacy SDK for React Native using npm or yarn. ```bash npm install @oursprivacy/react-native # or yarn add @oursprivacy/react-native ``` -------------------------------- ### List sources using Ours Privacy CLI Source: https://docs.oursprivacy.com/docs/platform-cli Example of using the CLI to list available sources. For command details, use the --help flag. ```bash oursprivacy sources list ``` -------------------------------- ### Install React Map GL Source: https://docs.oursprivacy.com/docs/maps/advanced-location-services Install the necessary packages for integrating Mapbox GL JS with React. ```bash npm install react-map-gl maplibre-gl ``` -------------------------------- ### Initialize and Track Event with Python SDK Source: https://docs.oursprivacy.com/docs/python Initialize the SDK and send a 'Purchase' event. Ensure you replace 'your-api-key' with your actual API key. The response object contains a 'success' boolean. ```python from ours_privacy import OursPrivacy client = OursPrivacy() # Track an event response = client.track.event( token="your-api-key", event="Purchase", ) print(response.success) ``` -------------------------------- ### Initialize and Track Event with Ruby SDK Source: https://docs.oursprivacy.com/docs/ruby Initialize the client and send a 'Purchase' event using your API key. Ensure you have run `bundle install` after updating your Gemfile. ```ruby require "bundler/setup" require "oursprivacy_ingest" ours_privacy = OursprivacyIngest::Client.new # Track an event response = ours_privacy.track.event(token: "your-api-key", event: "Purchase") puts(response.success) ``` -------------------------------- ### Error Response Example Source: https://docs.oursprivacy.com/docs/platform-api/quickstart This is an example of an error response from the API, indicating a lack of scope for the provided API key. ```json { "error": { "status": 403, "message": "API key does not have the required scope for this resource" } } ``` -------------------------------- ### Initialize and Track Event with PHP SDK Source: https://docs.oursprivacy.com/docs/php Initialize the client and track an event using your API key. Ensure the SDK is installed via Composer. ```php track->event(token: 'your-api-key', event: 'Purchase'); var_dump($response->success); ``` -------------------------------- ### Example: Update Consent Defaults and Track Events Source: https://docs.oursprivacy.com/docs/web-sdk-javascript Initialize the SDK, update default consent properties, and track events. Demonstrates how defaults are applied and how event-specific consent can override them. ```javascript // Initialize SDK ours('init', 'YOUR_TOKEN'); // Update consent defaults when user changes their preferences ours('updateDefaultUserConsentProperties', { analytics: true, marketing: false, functional: true, }); // All subsequent events will include the updated consent properties ours('track', 'Page View'); // This event's userProperties.consent will include: analytics, marketing, and functional // Event-specific consent can override defaults ours( 'track', 'Button Click', {}, { consent: { marketing: true }, // Overrides the default marketing: false } ); // This event's userProperties.consent will have: analytics: true, marketing: true, functional: true ``` -------------------------------- ### Install Ours Privacy PHP Ingest SDK Source: https://docs.oursprivacy.com/docs/sdk-overview Install the PHP Ingest SDK using Composer. This SDK is for sending server-side events. ```bash composer ``` -------------------------------- ### Manual Script Tag Installation (Custom Domain) Source: https://docs.oursprivacy.com/docs/experimentation/installation If you have a custom domain configured, use it for the experiment script. Pass the shared CDP visitor ID into init() for best results. ```html ``` -------------------------------- ### Install Ours Privacy PHP SDK with Composer Source: https://docs.oursprivacy.com/docs/php Use Composer to install the SDK. Visit the packagist repository or Github Repo for more details. ```bash composer require oursprivacy/ingest-sdk ``` -------------------------------- ### Install Ours Privacy Python Ingest SDK Source: https://docs.oursprivacy.com/docs/sdk-overview Install the Python Ingest SDK using pip. This SDK is used for server-side event tracking. ```bash pip install oursprivacy ```