### Install Go SDK Source: https://hightouch.com/docs/events/sdks/go Install the Go SDK using the go get command. ```go go get github.com/ht-sdks/events-sdk-go ``` -------------------------------- ### Install Hightouch Go SDK Source: https://hightouch.com/docs/llms-full.txt Install the Hightouch Go SDK using the go get command. ```bash go get github.com/ht-sdks/events-sdk-go ``` -------------------------------- ### Install C# SDK Source: https://hightouch.com/docs/events/sdks/csharp Install the Hightouch Events C# SDK using the .NET CLI. ```bash dotnet add package Hightouch.Events.CSharp ``` -------------------------------- ### Install Ruby SDK Source: https://hightouch.com/docs/events/sdks/ruby Install the Ruby SDK using RubyGems. This can be added to your Gemfile or installed directly. ```bash gem install events-sdk-ruby ``` -------------------------------- ### Install Dagster Hightouch Library Source: https://hightouch.com/docs/llms-full.txt Install the Hightouch Dagster extension using pip. This is the simplest way to get started. ```bash pip install dagster-hightouch ``` -------------------------------- ### Initialize Go SDK Source: https://hightouch.com/docs/events/sdks/go Initialize the Go SDK by creating a new Client instance with your write key and configuration. Ensure to close the client when done. ```go package main import ( "github.com/ht-sdks/events-sdk-go" ) func main() { client, _ := htevents.NewWithConfig("WRITE_KEY", htevents.Config{ Endpoint: "https://us-east-1.hightouch-events.com" }) defer client.Close() } ``` -------------------------------- ### Install Latest Hightouch CLI Source: https://hightouch.com/docs/llms-full.txt Installs the latest version of the Hightouch CLI using a shell script. This is the quickest way to get started with the CLI. ```shell # Install the latest version $ curl -sLf https://getcli.hightouch.io | sh - ``` -------------------------------- ### Get send delivery status Source: https://hightouch.com/docs/api-reference Get the delivery status of a single send by the `sendId` returned from the start endpoint. Requires bearer token authorization. ```APIDOC ## Get send delivery status ### Description Get the delivery status of a single send by the `sendId` returned from the start endpoint. ### Method GET ### Endpoint /campaigns/{campaignId}/sends/{sendId} ### Parameters #### Path Parameters - **campaignId** (string) - Required - - **sendId** (string) - Required - ### Responses #### Success Response (200) Ok #### Error Responses - **401** - Unauthorized - **404** - Send not found - **422** - Validation Failed - **500** - Something went wrong ### Response Example (200) ```json { "status": "string", "reason": "string" } ``` ``` -------------------------------- ### Initialize Browser SDK with npm Source: https://hightouch.com/docs/events/sdks/browser Import and initialize the Browser SDK after installing it via npm. Ensure you replace WRITE_KEY with your actual write key. ```javascript import { HtEventsBrowser } from "@ht-sdks/events-sdk-js-browser"; export const htevents = HtEventsBrowser.load( { writeKey: "WRITE_KEY" }, { apiHost: "us-east-1.hightouch-events.com" } ); ``` -------------------------------- ### Membership API Request Example Source: https://hightouch.com/docs/real-time/setup Example GET request to the Membership API to check audience membership for a specific user. Requires an API key for authorization. ```HTTP GET /v1/audiences/{parent_model_id}/{user_id} Authorization: Bearer ``` -------------------------------- ### Initialize Node.js SDK Source: https://hightouch.com/docs/events/sdks/nodejs Initialize the SDK once with your write key and host. Export the initialized instance for use throughout your application. ```javascript import { HtEvents } from "@ht-sdks/events-sdk-js-node"; // initialize once export const htevents = new HtEvents({ writeKey: "HT_WRITE_KEY", host: "https://us-east-1.hightouch-events.com", }); ``` -------------------------------- ### Example API Request Source: https://hightouch.com/docs/real-time/personalization-api Make a GET request to retrieve a specific customer record from a collection using the Personalization API. ```curl curl -X GET \ -H "Authorization: Bearer 55555555-4444-3333-2222-111111111111" \ "https://personalization.us-west-2.hightouch.com/v1/collections/customers/records/id/12345" ``` -------------------------------- ### Install Python SDK Source: https://hightouch.com/docs/events/sdks/python Install the Python SDK using pip. This is the first step to integrating event tracking into your Python application. ```bash pip install events-sdk-python ``` -------------------------------- ### Initialize PHP SDK Source: https://hightouch.com/docs/events/sdks/php Initialize the Hightouch SDK with your WRITE_KEY and specify the API host. This setup is required before making any tracking calls. ```php use Hightouch\Hightouch; Hightouch::init('WRITE_KEY', [ 'host' => 'https://us-east-1.hightouch-events.com', ]); ``` -------------------------------- ### Membership API Request Example Source: https://hightouch.com/docs/llms-full.txt Shows how to make a GET request to the Membership API to retrieve audience membership for a specific user. ```bash GET /v1/audiences/{parent_model_id}/{user_id} Authorization: Bearer ``` -------------------------------- ### Example API Request Source: https://hightouch.com/docs/destinations/personalization-api Make a GET request to retrieve a specific customer record from a collection using its ID. Ensure to replace placeholders with your actual region, collection name, and index value. ```curl curl -X GET \ -H "Authorization: Bearer 55555555-4444-3333-2222-111111111111" \ "https://personalization.us-west-2.hightouch.com/v1/collections/customers/records/id/12345" ``` -------------------------------- ### Initialize Hightouch Go SDK Client Source: https://hightouch.com/docs/llms-full.txt Initialize the Hightouch Go SDK client with a write key and configuration. Ensure to close the client when done. ```go package main import ( "github.com/ht-sdks/events-sdk-go" ) func main() { client, _ := htevents.NewWithConfig("WRITE_KEY", htevents.Config{ Endpoint: "https://us-east-1.hightouch-events.com" }) defer client.Close() } ``` -------------------------------- ### Install Browser SDK via Script Tag Source: https://hightouch.com/docs/events/sdks/browser Add this snippet to your site to install the Browser SDK using a script tag. Replace WRITE_KEY with your actual write key. ```javascript !function(){var e=window.htevents=window.htevents||[];if(!e.initialize)if(e.invoked)window.console&&console.error&&console.error("Hightouch snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(t),e.push(n),e}},e.methods.forEach(function(t){e[t]=e.factory(t)});var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://cdn.hightouch-events.com/browser/release/v1-latest/events.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),e._loadOptions={},e.load=function(t,n){e._loadOptions=n,e._writeKey=t},e.SNIPPET_VERSION="0.0.1",e.load('WRITE_KEY',{apiHost:'us-east-1.hightouch-events.com'}),e.page()}}(); ```