@@ -47,7 +47,7 @@ If you’re using a different library such as Analytics-Android, follow these st
47
47
<tbody>
48
48
<tr>
49
49
<td>Java</td>
50
- <td markdown=1 style="max-width: 450px ">
50
+ <td markdown=1 class="table-code-snippet ">
51
51
```java
52
52
Analytics analytics = new Analytics.Builder(context, "YOUR_WRITE_KEY")
53
53
.trackApplicationLifecycleEvents()
@@ -57,7 +57,7 @@ If you’re using a different library such as Analytics-Android, follow these st
57
57
</tr>
58
58
<tr>
59
59
<td>Kotlin</td>
60
- <td markdown=1 style="max-width: 450px ">
60
+ <td markdown=1 class="table-code-snippet ">
61
61
```kotlin
62
62
val analytics = Analytics.Builder(context, "YOUR_WRITE_KEY")
63
63
.trackApplicationLifecycleEvents()
@@ -76,10 +76,10 @@ If you’re using a different library such as Analytics-Android, follow these st
76
76
<th></th>
77
77
</tr>
78
78
</thead>
79
- <tbody style="max-width: 100%" >
79
+ <tbody>
80
80
<tr>
81
81
<td>Java</td>
82
- <td markdown=1 style="max-width: 450px ">
82
+ <td markdown=1 class="table-code-snippet ">
83
83
84
84
```java
85
85
// Initialize an Analytics object with the Kotlin Analytics method
@@ -97,7 +97,7 @@ If you’re using a different library such as Analytics-Android, follow these st
97
97
</tr>
98
98
<tr>
99
99
<td>Kotlin</td>
100
- <td markdown=1 style="max-width: 450px ">
100
+ <td markdown=1 class="table-code-snippet ">
101
101
102
102
```kotlin
103
103
Analytics("YOUR_WRITE_KEY", context) {
@@ -126,7 +126,7 @@ If you’re using a different library such as Analytics-Android, follow these st
126
126
<tbody>
127
127
<tr>
128
128
<td>Java</td>
129
- <td markdown=1 style="max-width: 450px ">
129
+ <td markdown=1 class="table-code-snippet ">
130
130
```java
131
131
builder
132
132
.useSourceMiddleware(new Middleware() {
@@ -154,7 +154,7 @@ If you’re using a different library such as Analytics-Android, follow these st
154
154
</tr>
155
155
<tr>
156
156
<td>Kotlin</td>
157
- <td markdown=1 style="max-width: 450px ">
157
+ <td markdown=1 class="table-code-snippet ">
158
158
```kotlin
159
159
builder
160
160
.useSourceMiddleware(
@@ -189,10 +189,10 @@ If you’re using a different library such as Analytics-Android, follow these st
189
189
<th></th>
190
190
</tr>
191
191
</thead>
192
- <tbody style="max-width: 100%" >
192
+ <tbody>
193
193
<tr>
194
194
<td>Java</td>
195
- <td markdown=1 style="max-width: 450px ">
195
+ <td markdown=1 class="table-code-snippet ">
196
196
197
197
```java
198
198
analytics.add(new Plugin() {
@@ -233,7 +233,7 @@ If you’re using a different library such as Analytics-Android, follow these st
233
233
</tr>
234
234
<tr>
235
235
<td>Kotlin</td>
236
- <td markdown=1 style="max-width: 450px ">
236
+ <td markdown=1 class="table-code-snippet ">
237
237
238
238
```kotlin
239
239
analytics.add(object: Plugin {
@@ -270,7 +270,7 @@ If you’re using a different library such as Analytics-Android, follow these st
270
270
<tbody>
271
271
<tr>
272
272
<td>Java</td>
273
- <td markdown=1 style="max-width: 450px ">
273
+ <td markdown=1 class="table-code-snippet ">
274
274
```java
275
275
builder
276
276
.useDestinationMiddleware("Segment.io", new Middleware() {
@@ -298,7 +298,7 @@ If you’re using a different library such as Analytics-Android, follow these st
298
298
</tr>
299
299
<tr>
300
300
<td>Kotlin</td>
301
- <td markdown=1 style="max-width: 450px ">
301
+ <td markdown=1 class="table-code-snippet ">
302
302
```kotlin
303
303
builder
304
304
.useDestinationMiddleware(
@@ -334,10 +334,10 @@ If you’re using a different library such as Analytics-Android, follow these st
334
334
<th></th>
335
335
</tr>
336
336
</thead>
337
- <tbody style="max-width: 100%" >
337
+ <tbody>
338
338
<tr>
339
339
<td>Java</td>
340
- <td markdown=1 style="max-width: 450px ">
340
+ <td markdown=1 class="table-code-snippet ">
341
341
342
342
```java
343
343
SegmentDestination segmentDestination = analytics.find(SegmentDestination.class);
@@ -380,7 +380,7 @@ If you’re using a different library such as Analytics-Android, follow these st
380
380
</tr>
381
381
<tr>
382
382
<td>Kotlin</td>
383
- <td markdown=1 style="max-width: 450px ">
383
+ <td markdown=1 class="table-code-snippet ">
384
384
385
385
```kotlin
386
386
val segmentDestination: DestinationPlugin = analytics.find(SegmentDestination::class)
@@ -447,7 +447,7 @@ If you’re using a different library such as Analytics-Android, follow these st
447
447
<tbody>
448
448
<tr>
449
449
<td>Java</td>
450
- <td markdown=1 style="max-width: 450px ">
450
+ <td markdown=1 class="table-code-snippet ">
451
451
```java
452
452
// Previously we used to use Factories to initialize destinations
453
453
analytics.use(FooIntegration.FACTORY);
@@ -456,7 +456,7 @@ If you’re using a different library such as Analytics-Android, follow these st
456
456
</tr>
457
457
<tr>
458
458
<td>Kotlin</td>
459
- <td markdown=1 style="max-width: 450px ">
459
+ <td markdown=1 class="table-code-snippet ">
460
460
```kotlin
461
461
// Previously we used to use Factories to initialize destinations
462
462
analytics.use(FooIntegration.FACTORY)
@@ -474,10 +474,10 @@ If you’re using a different library such as Analytics-Android, follow these st
474
474
<th></th>
475
475
</tr>
476
476
</thead>
477
- <tbody style="max-width: 100%" >
477
+ <tbody>
478
478
<tr>
479
479
<td>Java</td>
480
- <td markdown=1 style="max-width: 450px ">
480
+ <td markdown=1 class="table-code-snippet ">
481
481
482
482
```java
483
483
// Now destinations are treated similar to plugins and thus are simpler to add
@@ -488,7 +488,7 @@ If you’re using a different library such as Analytics-Android, follow these st
488
488
</tr>
489
489
<tr>
490
490
<td>Kotlin</td>
491
- <td markdown=1 style="max-width: 450px ">
491
+ <td markdown=1 class="table-code-snippet ">
492
492
493
493
```kotlin
494
494
// Now destinations are treated similar to plugins and thus are simpler to add
@@ -514,15 +514,15 @@ If you’re using a different library such as Analytics-Android, follow these st
514
514
<tbody>
515
515
<tr>
516
516
<td>Java</td>
517
- <td markdown=1 style="max-width: 450px ">
517
+ <td markdown=1 class="table-code-snippet ">
518
518
```java
519
519
analytics.identify("a user's id", new Traits().putName("John Doe"), null);
520
520
```
521
521
</td>
522
522
</tr>
523
523
<tr>
524
524
<td>Kotlin</td>
525
- <td markdown=1 style="max-width: 450px ">
525
+ <td markdown=1 class="table-code-snippet ">
526
526
```kotlin
527
527
analytics.identify("a user's id", Traits().putName("John Doe"), null)
528
528
```
@@ -539,10 +539,10 @@ If you’re using a different library such as Analytics-Android, follow these st
539
539
<th></th>
540
540
</tr>
541
541
</thead>
542
- <tbody style="max-width: 100%" >
542
+ <tbody>
543
543
<tr>
544
544
<td>Java</td>
545
- <td markdown=1 style="max-width: 450px ">
545
+ <td markdown=1 class="table-code-snippet ">
546
546
547
547
```java
548
548
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -570,7 +570,7 @@ If you’re using a different library such as Analytics-Android, follow these st
570
570
</tr>
571
571
<tr>
572
572
<td>Kotlin</td>
573
- <td markdown=1 style="max-width: 450px ">
573
+ <td markdown=1 class="table-code-snippet ">
574
574
575
575
```kotlin
576
576
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -606,15 +606,15 @@ If you’re using a different library such as Analytics-Android, follow these st
606
606
<tbody>
607
607
<tr>
608
608
<td>Java</td>
609
- <td markdown=1 style="max-width: 450px ">
609
+ <td markdown=1 class="table-code-snippet ">
610
610
```java
611
611
analytics.track("Product Viewed", new Properties().putValue("name", "Moto 360"));
612
612
```
613
613
</td>
614
614
</tr>
615
615
<tr>
616
616
<td>Kotlin</td>
617
- <td markdown=1 style="max-width: 450px ">
617
+ <td markdown=1 class="table-code-snippet ">
618
618
```kotlin
619
619
analytics.track("Product Viewed", Properties().putValue("name", "Moto 360"))
620
620
```
@@ -631,10 +631,10 @@ If you’re using a different library such as Analytics-Android, follow these st
631
631
<th></th>
632
632
</tr>
633
633
</thead>
634
- <tbody style="max-width: 100%" >
634
+ <tbody>
635
635
<tr>
636
636
<td>Java</td>
637
- <td markdown=1 style="max-width: 450px ">
637
+ <td markdown=1 class="table-code-snippet ">
638
638
639
639
```java
640
640
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -672,7 +672,7 @@ If you’re using a different library such as Analytics-Android, follow these st
672
672
</tr>
673
673
<tr>
674
674
<td>Kotlin</td>
675
- <td markdown=1 style="max-width: 450px ">
675
+ <td markdown=1 class="table-code-snippet ">
676
676
677
677
```kotlin
678
678
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -725,15 +725,15 @@ If you’re using a different library such as Analytics-Android, follow these st
725
725
<tbody>
726
726
<tr>
727
727
<td>Java</td>
728
- <td markdown=1 style="max-width: 450px ">
728
+ <td markdown=1 class="table-code-snippet ">
729
729
```java
730
730
analytics.group("a user's id", "a group id", new Traits().putEmployees(20));
731
731
```
732
732
</td>
733
733
</tr>
734
734
<tr>
735
735
<td>Kotlin</td>
736
- <td markdown=1 style="max-width: 450px ">
736
+ <td markdown=1 class="table-code-snippet ">
737
737
```kotlin
738
738
analytics.group("a user's id", "a group id", Traits().putEmployees(20))
739
739
```
@@ -750,10 +750,10 @@ If you’re using a different library such as Analytics-Android, follow these st
750
750
<th></th>
751
751
</tr>
752
752
</thead>
753
- <tbody style="max-width: 100%" >
753
+ <tbody>
754
754
<tr>
755
755
<td>Java</td>
756
- <td markdown=1 style="max-width: 450px ">
756
+ <td markdown=1 class="table-code-snippet ">
757
757
758
758
```java
759
759
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -779,7 +779,7 @@ If you’re using a different library such as Analytics-Android, follow these st
779
779
</tr>
780
780
<tr>
781
781
<td>Kotlin</td>
782
- <td markdown=1 style="max-width: 450px ">
782
+ <td markdown=1 class="table-code-snippet ">
783
783
784
784
```kotlin
785
785
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -812,15 +812,15 @@ If you’re using a different library such as Analytics-Android, follow these st
812
812
<tbody>
813
813
<tr>
814
814
<td>Java</td>
815
- <td markdown=1 style="max-width: 450px ">
815
+ <td markdown=1 class="table-code-snippet ">
816
816
```java
817
817
analytics.screen("Feed", new Properties().putValue("Feed Length", "26"));
818
818
```
819
819
</td>
820
820
</tr>
821
821
<tr>
822
822
<td>Kotlin</td>
823
- <td markdown=1 style="max-width: 450px ">
823
+ <td markdown=1 class="table-code-snippet ">
824
824
```kotlin
825
825
analytics.screen("Feed", Properties().putValue("Feed Length", "26"))
826
826
```
@@ -837,10 +837,10 @@ If you’re using a different library such as Analytics-Android, follow these st
837
837
<th></th>
838
838
</tr>
839
839
</thead>
840
- <tbody style="max-width: 100%" >
840
+ <tbody>
841
841
<tr>
842
842
<td>Java</td>
843
- <td markdown=1 style="max-width: 450px ">
843
+ <td markdown=1 class="table-code-snippet ">
844
844
845
845
```java
846
846
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -865,7 +865,7 @@ If you’re using a different library such as Analytics-Android, follow these st
865
865
</tr>
866
866
<tr>
867
867
<td>Kotlin</td>
868
- <td markdown=1 style="max-width: 450px ">
868
+ <td markdown=1 class="table-code-snippet ">
869
869
870
870
```kotlin
871
871
// The newer APIs promote the use of strongly typed structures to keep codebases legible
@@ -900,15 +900,15 @@ If you’re using a different library such as Analytics-Android, follow these st
900
900
<tbody>
901
901
<tr>
902
902
<td>Java</td>
903
- <td markdown=1 style="max-width: 450px ">
903
+ <td markdown=1 class="table-code-snippet ">
904
904
```java
905
905
analytics.alias("new id");
906
906
```
907
907
</td>
908
908
</tr>
909
909
<tr>
910
910
<td>Kotlin</td>
911
- <td markdown=1 style="max-width: 450px ">
911
+ <td markdown=1 class="table-code-snippet ">
912
912
```kotlin
913
913
analytics.alias("new id")
914
914
```
@@ -925,10 +925,10 @@ If you’re using a different library such as Analytics-Android, follow these st
925
925
<th></th>
926
926
</tr>
927
927
</thead>
928
- <tbody style="max-width: 100%" >
928
+ <tbody>
929
929
<tr>
930
930
<td>Java</td>
931
- <td markdown=1 style="max-width: 450px ">
931
+ <td markdown=1 class="table-code-snippet ">
932
932
933
933
```java
934
934
analytics.alias("new id");
@@ -937,7 +937,7 @@ If you’re using a different library such as Analytics-Android, follow these st
937
937
</tr>
938
938
<tr>
939
939
<td>Kotlin</td>
940
- <td markdown=1 style="max-width: 450px ">
940
+ <td markdown=1 class="table-code-snippet ">
941
941
942
942
```kotlin
943
943
analytics.alias("new id")
0 commit comments