PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.37
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.37
9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 8.5.4 All 221 releases
wpvr / vendor / posthog / posthog-php / example.php

example.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.37, at vendor/posthog/posthog-php/example.php

54 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 require_once __DIR__ . '/vendor/autoload.php';
4
5 use PostHog\PostHog;
6
7 const PROJECT_API_KEY = "phc_LBp6TCrkZahJAGVGovQBeNfDIap2hD1ymNjoOftoCow";
8 const PERSONAL_API_KEY = "phx_pWOpWbl64FJqmRinGtGpPvceve1wqKyqUxwYPdWho86";
9
10 PostHog::init(
11 PROJECT_API_KEY,
12 array('host' => 'https://app.posthog.com', 'debug' => true),
13 null,
14 PERSONAL_API_KEY
15 );
16
17
18
19 # Capture an event
20 PostHog::capture(
21 [
22 'distinctId' => 'distinct_id',
23 'event' => 'event',
24 'properties' => [
25 'property1' => 'value',
26 'property2' => 'value',
27 ],
28 // 'groups' => [
29 // 'org' => 123
30 // ],
31 // 'sendFeatureFlags' => true
32 // 'sendFeatureFlags' => true
33 'send_feature_flags' => true
34 ]
35 );
36
37 // PostHog::capture(
38 // [
39 // 'distinctId' => 'distinct_id',
40 // 'event' => 'event2',
41 // 'properties' => [
42 // 'property1' => 'value',
43 // 'property2' => 'value',
44 // ],
45 // // 'groups' => [
46 // // 'org' => 123
47 // // ],
48 // 'sendFeatureFlags' => false
49 // ]
50 // );
51
52 $enabled = PostHog::getFeatureFlag("first", "user_2311144");
53
54 echo $enabled;