Skip to content

Commit 15768c9

Browse files
authored
Send name of event tags instead of id (#36)
1 parent d033ec3 commit 15768c9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Optimizely/Event/Builder/EventBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private function setConversionParams($config, $eventKey, $experiments, $userId,
168168
continue;
169169
}
170170
$eventFeature = array(
171-
'id' => $eventTagId,
171+
'name' => $eventTagId,
172172
'type' => 'custom',
173173
'value' => $eventTagValue,
174174
'shouldIndex' => false,

tests/EventTests/EventBuilderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function testCreateConversionEventNoAttributesWithValue()
234234
'timestamp' => time() * 1000,
235235
'eventFeatures' => [
236236
[
237-
'id' => 'revenue',
237+
'name' => 'revenue',
238238
'type' => 'custom',
239239
'value' => 42,
240240
'shouldIndex' => false
@@ -287,13 +287,13 @@ public function testCreateConversionEventWithAttributesWithValue()
287287
'timestamp' => time() * 1000,
288288
'eventFeatures' => [
289289
[
290-
'id' => 'revenue',
290+
'name' => 'revenue',
291291
'type' => 'custom',
292292
'value' => 42,
293293
'shouldIndex' => false
294294
],
295295
[
296-
'id' => 'non-revenue',
296+
'name' => 'non-revenue',
297297
'type' => 'custom',
298298
'value' => 'definitely',
299299
'shouldIndex' => false
@@ -362,13 +362,13 @@ public function testCreateConversionEventNoAttributesWithInvalidValue()
362362
'timestamp' => time() * 1000,
363363
'eventFeatures' => [
364364
[
365-
'id' => 'revenue',
365+
'name' => 'revenue',
366366
'type' => 'custom',
367367
'value' => 42,
368368
'shouldIndex' => false
369369
],
370370
[
371-
'id' => 'non-revenue',
371+
'name' => 'non-revenue',
372372
'type' => 'custom',
373373
'value' => 'definitely',
374374
'shouldIndex' => false

0 commit comments

Comments
 (0)