Skip to content

Commit e23a954

Browse files
authored
Merge pull request #548 from segmentio/repo-sync
repo sync
2 parents 5e9a478 + 8946ff7 commit e23a954

File tree

6 files changed

+81
-54
lines changed

6 files changed

+81
-54
lines changed

src/_layouts/search.html

Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
layout: main
33
---
4-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/satellite-min.css" integrity="sha256-TehzF/2QvNKhGQrrNpoOb2Ck4iGZ1J/DI4pkd2oUsBc=" crossorigin="anonymous">
4+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/satellite-min.css"
5+
integrity="sha256-TehzF/2QvNKhGQrrNpoOb2Ck4iGZ1J/DI4pkd2oUsBc=" crossorigin="anonymous">
56

67
<main class="docs__body stage__body">
78
<div class="docs__navbar">
@@ -11,11 +12,11 @@
1112
<div class="field field--expand field--icon">
1213
<div id="autocomplete"></div>
1314
{% unless include.mobile %}
14-
<div class="field__icon field__icon--right flex flex--middle flex--center">
15-
<button class="field__button" data-ref="search-navbar[trigger]">
16-
{% include icons/symbols/cross.svg %}
17-
</button>
18-
</div>
15+
<div class="field__icon field__icon--right flex flex--middle flex--center">
16+
<button class="field__button" data-ref="search-navbar[trigger]">
17+
{% include icons/symbols/cross.svg %}
18+
</button>
19+
</div>
1920
{% endunless %}
2021
</div>
2122
</div>
@@ -34,9 +35,9 @@
3435
{% include components/breadcrumbs.html %}
3536

3637
{%- if page.title -%}
37-
<h1 id="{{ page.title | slugify }}">
38-
{{ page.title }}
39-
</h1>
38+
<h1 id="{{ page.title | slugify }}">
39+
{{ page.title }}
40+
</h1>
4041
{%- endif -%}
4142

4243
<div class="markdown" data-headings-anchors>
@@ -45,8 +46,8 @@ <h1 id="{{ page.title | slugify }}">
4546

4647

4748
{% unless page.hide-feedback %}
48-
<hr>
49-
{% include components/feedback.html %}
49+
<hr>
50+
{% include components/feedback.html %}
5051
{% endunless %}
5152

5253
<hr>
@@ -56,51 +57,61 @@ <h1 id="{{ page.title | slugify }}">
5657

5758
</article>
5859
</main>
59-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch-lite.umd.js" integrity="sha256-EXPXz4W6pQgfYY3yTpnDa3OH8/EPn16ciVsPQ/ypsjk=" crossorigin="anonymous"></script>
60-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js" integrity="sha256-LAGhRRdtVoD6RLo2qDQsU2mp+XVSciKRC8XPOBWmofM=" crossorigin="anonymous"></script>
60+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/algoliasearch-lite.umd.js"
61+
integrity="sha256-EXPXz4W6pQgfYY3yTpnDa3OH8/EPn16ciVsPQ/ypsjk=" crossorigin="anonymous"></script>
62+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.production.min.js"
63+
integrity="sha256-LAGhRRdtVoD6RLo2qDQsU2mp+XVSciKRC8XPOBWmofM=" crossorigin="anonymous"></script>
6164

6265
<script>
63-
const appId = 'UINQ2M4D9S';
64-
const apiKey = '636b6d9e2dfb207e89ea7344859848f9';
65-
const searchClient = algoliasearch(appId, apiKey);
66-
67-
const instantSearch = instantsearch({
68-
indexName: 'segment-docs',
69-
searchClient,
70-
routing: true,
71-
facetFilters: ['hidden:-true'],
72-
73-
});
66+
const appId = 'UINQ2M4D9S';
67+
const apiKey = '636b6d9e2dfb207e89ea7344859848f9';
68+
const searchClient = algoliasearch(appId, apiKey);
7469

75-
instantSearch.addWidgets([
76-
instantsearch.widgets.searchBox({
77-
container: '#searchbox',
78-
}),
7970

80-
instantsearch.widgets.configure({
81-
hitsPerPage: 7,
71+
const instantSearch = instantsearch({
72+
indexName: 'segment-docs',
73+
searchClient,
74+
routing: true,
8275
facetFilters: ['hidden:-true'],
83-
}),
84-
85-
instantsearch.widgets.hits({
86-
container: '#hits',
87-
templates: {
88-
item(item){
89-
if (item.anchor != null) {
90-
var anchorLink = "#" + item.anchor;
91-
} else {
92-
var anchorLink = "";
93-
}
94-
return `<a class="aa-link" href="/docs${item.url}${anchorLink}">
95-
<p class="aa-title" >${item.title}</h3>
76+
77+
});
78+
79+
instantSearch.addWidgets([
80+
instantsearch.widgets.searchBox({
81+
container: '#searchbox',
82+
}),
83+
84+
instantsearch.widgets.configure({
85+
hitsPerPage: 10,
86+
facetFilters: ['hidden:-true'],
87+
}),
88+
89+
instantsearch.widgets.pagination({
90+
container: '#pagination'
91+
92+
}),
93+
94+
instantsearch.widgets.hits({
95+
container: '#hits',
96+
templates: {
97+
item(item) {
98+
if (item.anchor != null) {
99+
var anchorLink = "#" + item.anchor;
100+
} else {
101+
var anchorLink = "";
102+
}
103+
return `<a class="aa-link" href="/docs${item.url}${anchorLink}">
104+
<p class="aa-title" >${instantsearch.highlight({attribute: 'title', hit: item})}</h3>
96105
<p class="aa-heading">${item.headings.join(' >')}</p>
97-
<p class="aa-content">${item.content}</p></a>
106+
<p class="aa-content">${instantsearch.highlight({attribute: 'content', hit: item})}</p></a>
98107
`;
108+
}
99109
}
100-
}
101-
})
102-
]);
110+
})
111+
]);
112+
113+
103114

104-
instantSearch.start();
115+
instantSearch.start();
105116

106117
</script>

src/_sass/components/_search.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,8 @@ a.aa-link:hover {
105105
border-radius: 5px;
106106
color: white;
107107
font-size: 10px;
108+
}
109+
110+
.ais-Pagination-item:before {
111+
content: none!important;
108112
}

src/connections/destinations/catalog/actions-amplitude/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@ Amplitude (Actions) provides the following benefits over the classic Amplitude d
3737

3838
Once you have a mapping, you can follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customizing-mappings).
3939

40+
### Log Purchases in existing destination instances
41+
42+
Initially, the Log Event Action was reporting purchases to Amplitude for all events containing a `products` array, even if the products were just added to cart. This inflated the LTV Chart in Amplitude.
43+
44+
To resolve this, purchase reporting takes place in a new Action called Log Purchase.
45+
46+
For instances created prior to before the Log Purchases action was released, you need to manually add the Log Purchases Action to report purchases to Amplitude.
47+
48+
To manually add the Log Purchases Action:
49+
1. Add a new Mapping for the Log Purchases Action. The default trigger for this action is Order Completed events.
50+
2. Modify the Trigger if you need to report purchases for any other events.
51+
3. Modify the Trigger of Log Event to exclude these same events. This helps you to avoid sending the same event twice.
52+
4. Enable the Log Purchases mapping.
53+
4054
### Connection Modes for Amplitude (Actions) destination
4155

4256
The Amplitude (actions) destination does not offer a device-mode connection mode. If you're using one of Segment's new libraries ([Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin)) with the Actions-framework version of the destination, you do not need the device-mode connection.

src/connections/destinations/catalog/actions-moengage/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: MoEngage (Actions) Destination
33
hide-personas-partial: true
44
hide-boilerplate: true
55
hide-dossier: true
6-
hidden: true
7-
private: true
86
id: 620feaa207e70f6c6a765ff7
97
---
108

src/connections/destinations/catalog/actions-snap-conversions/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ id: 6261a8b6cb4caa70e19116e8
77

88
The Snapchat Conversions API destination is a server-to-server integration with the [Snapchat Conversions API](https://marketingapi.snapchat.com/docs/conversion.html#conversions-api){:target="_blank"} that allows advertisers to pass web, app, and offline events from Segment directly to Snap. Data shared through the Snapchat Conversions API is processed similarly to events passed through the Snap Pixel or App Ads Kit (SDK). By passing events, advertisers can access post-view and post-swipe campaign reporting to measure performance and incrementality. Depending on the data shared and timeliness of integration, it’s also possible to use events passed through the Conversions API for solutions such as custom audience targeting, campaign optimization, Dynamic Ads, and more.
99

10-
> info ""
11-
> The Snapchat Conversions API destination is in beta and is in active development. Some functionality may change before it becomes generally available.
12-
1310
## Benefits of the Snapchat Conversions API
1411
The Snapchat Conversions API destination provides the following benefits:
1512
- **Clear mapping of data.** Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to Snap.
@@ -83,3 +80,5 @@ In addition, Segment creates a SHA-256 hash of the following fields before sendi
8380
- Phone Number
8481
- IP Address
8582

83+
> warning ""
84+
> If you hash identifiers upstream before sending to Segment, Segment still hashes that data before sending to Snap. This results in a double hash that won't be able to be matched on. Please ensure your fields are not hashed prior to sending through the Snapchat Conversions API destination.

src/utils/search.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ title: search
33
layout: search
44
---
55
<div id="searchbox"></div>
6-
<div id="hits"></div>
6+
<div id="hits"></div>
7+
<div id="pagination"></div>

0 commit comments

Comments
 (0)