### Install Journify Go SDK
Source: https://docs.journify.io/sources/go
Installs the journify-go package using the go get command. This is the first step to integrate the SDK into your Go project.
```sh
go get github.com/journifyio/journify-go
```
--------------------------------
### OneSignal API Key Setup
Source: https://docs.journify.io/destinations/onesignal
Instructions on how to obtain the necessary API keys from the OneSignal dashboard to enable data synchronization and management.
```APIDOC
API Key Generation:
1. Navigate to your OneSignal applications page.
2. Select your application.
3. Go to the 'Settings' tab.
4. Click on 'Keys & IDs'.
5. Copy the 'Rest API Key'.
User Auth Key Generation:
1. Click on your account avatar in the top right corner.
2. Go to the account management page.
3. Scroll down to the 'User Auth Key' section.
4. Click the button to generate a new key.
5. Copy the generated User Auth Key.
```
--------------------------------
### Install Journify Node.js SDK
Source: https://docs.journify.io/sources/node.js-sdk
Instructions for installing the Journify Node.js SDK using different package managers.
```bash
npm install @journifyio/nodejs-sdk
```
```bash
yarn add @journifyio/nodejs-sdk
```
```bash
pnpm add @journifyio/nodejs-sdk
```
--------------------------------
### Journify Tracking Events
Source: https://docs.journify.io/getting-started
Implement these calls to track user behavior and page/screen views within your connected sources. IdentifyEvent is for authenticated users, TrackEvent captures specific business events, and PageEvent/ScreenEvent track navigation.
```APIDOC
IdentifyEvent(userId: string, userProperties: object)
- Records properties and traits for an authenticated user.
- Parameters:
- userId: A unique identifier for the authenticated user.
- userProperties: An object containing key-value pairs of user attributes.
- Returns: void
TrackEvent(eventName: string, eventProperties: object)
- Records a specific event performed by a user.
- Parameters:
- eventName: The name of the event (e.g., 'Purchase', 'ButtonClick').
- eventProperties: An object containing details about the event.
- Returns: void
PageEvent(pageName: string, pageProperties: object)
- Tracks a page view for websites and web applications.
- Parameters:
- pageName: The name of the page being viewed.
- pageProperties: An object containing properties related to the page view.
- Returns: void
ScreenEvent(screenName: string, screenProperties: object)
- Tracks a screen view for mobile applications.
- Parameters:
- screenName: The name of the screen being viewed.
- screenProperties: An object containing properties related to the screen view.
- Returns: void
```
--------------------------------
### Install SDK via Pnpm
Source: https://docs.journify.io/sources/javascript
Installs the Journify JavaScript SDK using the Pnpm package manager.
```bash
pnpm add @journifyio/js-sdk
```
--------------------------------
### Install SDK via NPM
Source: https://docs.journify.io/sources/javascript
Installs the Journify JavaScript SDK using the npm package manager.
```bash
npm install @journifyio/js-sdk
```
--------------------------------
### Install SDK via Yarn
Source: https://docs.journify.io/sources/javascript
Installs the Journify JavaScript SDK using the Yarn package manager.
```bash
yarn add @journifyio/js-sdk
```
--------------------------------
### Install Journify PHP SDK with Composer
Source: https://docs.journify.io/sources/php
Installs the Journify PHP SDK using Composer, a dependency manager for PHP. This command fetches and installs the necessary package for your project.
```bash
composer require journify/journify-php
```
--------------------------------
### Stripe API Key Setup and Usage
Source: https://docs.journify.io/destinations/stripe
Instructions on how to generate a Stripe API key from the Stripe dashboard and use it within the Journify application for secure data synchronization. Emphasizes using live mode keys.
```APIDOC
Stripe API Key Management:
Purpose: To authenticate Journify with your Stripe account for data synchronization.
Steps to Obtain API Key:
1. Ensure you are in 'live mode' in your Stripe dashboard.
2. Navigate to the 'Developers' tab.
3. Select 'API Key' from the left-hand menu.
4. Click 'Reveal live key' under the 'Secret key' section.
5. Copy the generated API key.
6. Paste the copied API key into the Journify app.
Usage: The API key is used by Journify to make authenticated requests to the Stripe API on your behalf, enabling actions like customer data synchronization.
```
--------------------------------
### Install Journify Python SDK
Source: https://docs.journify.io/sources/python
Installs the Journify Python SDK using pip. This is the initial step required to integrate the SDK into your Python project.
```bash
pip install journify-python-sdk
```
--------------------------------
### Install iOS Pods
Source: https://docs.journify.io/sources/react-native-sdk
Installs the necessary pods for the iOS platform after adding dependencies, ensuring native modules are correctly linked.
```bash
cd ios && pod install
```
--------------------------------
### Install Native Modules (iOS)
Source: https://docs.journify.io/sources/react-native-sdk
After installing the SDK packages, run this command to link native modules for iOS projects using CocoaPods.
```bash
npx pod-install
```
--------------------------------
### Install Journify React Native SDK (NPM/Yarn)
Source: https://docs.journify.io/sources/react-native-sdk
Installs the core SDK and necessary plugins using npm or yarn. Includes dependencies for state management, IDFA, advertising ID, UUID generation, and async storage.
```bash
npm install --save @journifyio/react-native-sdk @journifyio/react-native-sdk-sovran @journifyio/react-native-sdk-plugin-idfa @journifyio/react-native-sdk-plugin-advertising-id react-native-get-random-values @react-native-async-storage/async-storage
```
```bash
yarn add @journifyio/react-native-sdk @journifyio/react-native-sdk-sovran @journifyio/react-native-sdk-plugin-idfa @journifyio/react-native-sdk-plugin-advertising-id react-native-get-random-values @react-native-async-storage/async-storage
```
--------------------------------
### Get LinkedIn Tag Manager Partner ID
Source: https://docs.journify.io/destinations/linkedin-ads-insight-tag
Steps to retrieve your LinkedIn Tag Manager Partner ID from the LinkedIn Ads platform. This ID is crucial for connecting your website analytics with LinkedIn campaigns.
```APIDOC
1. Navigate to LinkedIn Ads account.
2. Access 'Signals Manager' under the 'Analyze' menu.
3. Select 'Insight Tag' from the sources catalog.
4. Choose the 'I will use a tag manager' option.
5. Accept LinkedIn's terms and conditions.
6. Locate and copy the displayed Partner ID.
```
--------------------------------
### Journify LinkedIn Insight Tag Destination Setup
Source: https://docs.journify.io/destinations/linkedin-ads-insight-tag
Steps to configure the LinkedIn Insight Tag destination within the Journify platform. This involves connecting your LinkedIn ad account and providing the necessary Partner ID.
```APIDOC
1. In Journify, navigate to the destination page and select 'LinkedIn Insight Tag'.
2. Click the 'Connect' button to initiate LinkedIn account linking.
3. Authenticate and authorize Journify to access your LinkedIn ad accounts and conversions.
4. Select the desired LinkedIn ad account within Journify.
5. Paste the previously obtained LinkedIn Partner ID into the designated field.
```
--------------------------------
### Install SDK via HTML Snippet
Source: https://docs.journify.io/sources/javascript
Includes the Journify SDK directly in an HTML page's head tag for asynchronous loading. This snippet initializes the SDK and loads the latest version from a CDN.
```javascript
```
--------------------------------
### Pipedrive API Key Setup Guide
Source: https://docs.journify.io/destinations/pipedrive
Instructions on how to generate and copy a Pipedrive API key required for Journify to manage persons on behalf of your account. This key is essential for authentication.
```APIDOC
Pipedrive API Key Generation:
1. Log in to your Pipedrive account.
2. Click on your organization name in the top-right corner.
3. Navigate to 'Personal preferences'.
4. Select the 'API' tab.
5. Click 'Generate new token' if you do not have an existing one.
6. Copy the generated API token for use in Journify.
```
--------------------------------
### Full Initialization Example for Journify Analytics
Source: https://docs.journify.io/sources/flutter-sdk
Demonstrates the complete initialization process for the Journify Analytics client, including setting the write key and adding necessary plugins like Advertising ID and IDFA.
```dart
import 'package:journify_analytics/client.dart';
import 'package:journify_analytics/event.dart';
import 'package:journify_analytics/state.dart';
import 'package:journify_analytics_plugin_advertising_id/plugin_advertising_id.dart';
import 'package:journify_analytics_plugin_idfa/plugin_idfa.dart';
const writeKey = 'WRITE_KEY';
class _MyAppState extends State {
final analytics = createClient(Configuration(writeKey));
@override
void initState() {
super.initState();
initPlatformState();
analytics.addPlugin(PluginAdvertisingId());
analytics.addPlugin(PluginIdfa());
}
}
```
--------------------------------
### MoEngage Data Center ID Examples
Source: https://docs.journify.io/destinations/moengage
Illustrates how to determine your MoEngage Data Center ID based on your dashboard URL. This ID is required when sending data to MoEngage via REST APIs.
```APIDOC
MoEngage Data Center ID Determination:
- If dashboard URL is `https://dashboard-01.moengage.com`, Data Center ID is `1`.
- If dashboard URL is `https://dashboard-02.moengage.com`, Data Center ID is `2`.
- If dashboard URL is `https://dashboard-03.moengage.com`, Data Center ID is `3`.
- If dashboard URL is `https://dashboard-04.moengage.com`, Data Center ID is `4`.
```
--------------------------------
### Initialize Journify Client
Source: https://docs.journify.io/sources/node.js-sdk
Shows how to create an instance of the Journify client with a write key and optional configuration parameters.
```javascript
const journifyClient = new Journify("");
```
```javascript
const journifyClient = new Journify("", {
flushAt: 100,
flushInterval: 10000,
retryCount: 3,
enable: true
});
```
--------------------------------
### Initialize SDK with NPM
Source: https://docs.journify.io/sources/javascript
Initializes the Journify SDK after installing it via npm. Requires importing the SDK and calling the `load` method with your write key.
```javascript
import * as journify from "@journifyio/js-sdk";
journify.load({ writeKey: "" })
```
--------------------------------
### Create LinkedIn Insight Tag Conversion Rules
Source: https://docs.journify.io/destinations/linkedin-ads-insight-tag
Instructions for setting up conversion rules of type 'Insight Tag Conversion' within your LinkedIn Ads account. This enables tracking specific website actions as conversions.
```APIDOC
1. Go to your LinkedIn Ads account.
2. Navigate to 'Conversion tracking' under the 'Analyze' menu.
3. Click 'Create conversion' and select 'Insight Tag Conversion'.
4. Define conversion category and other parameters, then proceed.
5. Select 'Manual conversions setup' as the data source.
6. Choose 'Event-specific' as the tracking method.
7. Associate relevant campaigns with the conversion and finalize creation.
```
--------------------------------
### Configure Journify Client with Logging
Source: https://docs.journify.io/sources/go
This Go code snippet demonstrates how to initialize the Journify client with custom configuration. It enables verbose logging and directs log output to standard error using `log.New` and `os.Stderr`.
```go
func main() {
client, _ := journify.NewWithConfig("YOUR_WRITE_KEY", journify.Config{
Verbose: true,
Logger: journify.StdLogger(log.New(os.Stderr, "journify ", log.LstdFlags)),
})
}
```
--------------------------------
### Pushing a Standard Ecommerce Event
Source: https://docs.journify.io/sources/google-tag-manager-browser-template
This snippet pushes a standard ecommerce event, 'begin_checkout', with basic currency and value parameters. This demonstrates tracking common ecommerce actions within the data layer.
```javascript
window.dataLayer.push({
event: "begin_checkout",
currency: "USD",
value: 1000,
})
```
--------------------------------
### Initialize SDK
Source: https://docs.journify.io/sources/ios-sdk
Initializes the Journify SDK with a provided write key and custom configuration. This setup is crucial before making any tracking calls. It allows for setting application lifecycle event tracking and flush intervals.
```Swift
import Journify
let configuration = Configuration(writeKey: "") \
.trackApplicationLifecycleEvents(true) \
.flushInterval(10)
Journify.setup(with: configuration)
```
```Objective-C
@import Journify;
...
JFConfiguration *configuration = [[JFConfiguration alloc] initWithWriteKey:@"<YOUR_WRITE_KEY>"];
[configuration setTrackApplicationLifecycleEvents: true];
[configuration setFlushInterval: 10];
[JFJournify setupWith:configuration];
```
--------------------------------
### Initialize Journify SDK in Java
Source: https://docs.journify.io/sources/java
Demonstrates how to initialize the Journify SDK in a Java application using a write key. This setup is required before making any analytics calls.
```Java
import io.journify.analytics.Journify;
Journify journify = Journify.builder("YOUR_WRITE_KEY").build();
```
--------------------------------
### Install Journify Hashing Dependency (yarn)
Source: https://docs.journify.io/sources/react-native-sdk
Installs the react-native-sha256 package required for hashing first-party data using yarn. This is a prerequisite for enabling the `hashPII` option.
```bash
yarn add react-native-sha256
```