Skip to content

Commit 0d1426d

Browse files
authored
style guide clean up
Updated formatting and language for clarity and consistency throughout the Marketo documentation.
1 parent 9a3f0f7 commit 0d1426d

File tree

1 file changed

+26
-24
lines changed
  • src/connections/destinations/catalog/marketo

1 file changed

+26
-24
lines changed

src/connections/destinations/catalog/marketo/index.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,27 @@ title: Marketo Destination
33
strat: adobe
44
---
55

6-
## Getting Started
6+
## Getting started
77

88
When you enable Marketo in the Segment web app, your changes appear in the Segment CDN in about 45 minutes, and then Analytics.js starts asynchronously loading Marketo's Munchkin onto your page. This means you should remove Marketo's snippet from your page.
9-
+ Marketo starts automatically recording visitor information.
109

11-
### Important Note:
12-
Our client-side and server-side destinations each require **different** credentials for authentication. Read through the information below on `identify` calls for further information.
10+
> info ""
11+
> Marketo starts automatically recording visitor information.
12+
13+
> warning ""
14+
> Client-side and server-side destinations each require **different** credentials for authentication. Read through [Identify](#identify) for further information.
1315
1416
## Page and Track
1517

16-
For [`Page`](/docs/connections/spec/page/) or [`Track`](/docs/connections/spec/track/) methods, Segment uses [Marketo's Munchkin.js `visitWebPage` method](http://developers.marketo.com/javascript-api/lead-tracking/api-reference/#munchkin_visitwebpage){:target="_blank"}. The URL is built from the Segment event and properties object into the form Marketo expects, so no need to worry about doing that yourself.
18+
For [Page](/docs/connections/spec/page/) or [Track](/docs/connections/spec/track/) methods, Segment uses [Marketo's Munchkin.js `visitWebPage` method](http://developers.marketo.com/javascript-api/lead-tracking/api-reference/#munchkin_visitwebpage){:target="_blank"}. The URL is built from the Segment event and properties object into the form Marketo expects, so no need to worry about doing that yourself.
1719

18-
To associate Track events to a particular Lead in Marketo from a server side library, you will need to pass the Munchkin.js cookie with your track calls.
20+
To associate Track events to a particular Lead in Marketo from a server side library, you need to pass the Munchkin.js cookie with your track calls.
1921

2022
## Identify
2123

2224
### Client-side
2325

24-
When you call [`identify`](/docs/connections/spec/identify/) on Analytics.js, we call Marketo's [`associateLead`](http://developers.marketo.com/documentation/websites/lead-tracking-munchkin-js/){:target="_blank"}. Marketo **requires an email address** for this function, so if the `traits` object you include in [`identify`](/docs/connections/spec/identify/) doesn't have an email, the request won't go through. Marketo's client-side library, [Munchkin](http://developers.marketo.com/documentation/websites/lead-tracking-munchkin-js/){:target="_blank"}, **requires your API private key** for authentication along with your email, so make sure that you have provided it in your Segment settings. We will not change the casing of traits on client-side identify calls.
26+
When you call [Identify](/docs/connections/spec/identify/) on Analytics.js, Segment calls Marketo's [`associateLead`](http://developers.marketo.com/documentation/websites/lead-tracking-munchkin-js/){:target="_blank"}. Marketo **requires an email address** for this function, so if the `traits` object you include in [Identify](/docs/connections/spec/identify/) doesn't have an email, the request won't go through. Marketo's client-side library, [Munchkin](http://developers.marketo.com/documentation/websites/lead-tracking-munchkin-js/){:target="_blank"}, **requires your API private key** for authentication along with your email, so make sure that you have provided it in your Segment settings. Segment doesn't change the casing of traits on client-side identify calls.
2527

2628
```javascript
2729
analytics.identify('1234', {
@@ -32,21 +34,21 @@ analytics.identify('1234', {
3234
});
3335
```
3436

35-
In order to properly sign the `associateLead` request while keeping your account and data secure, we make a request to our API that calculates the appropriate SHA1 security hash for the user you're identifying. We use this hash to sign the `associateLead` request to Marketo.
37+
In order to properly sign the `associateLead` request while keeping your account and data secure, Segment makes a request to our API that calculates the appropriate SHA1 security hash for the user you're identifying. This hash is used to sign the `associateLead` request to Marketo.
3638

37-
Note that we will automatically send `userId` as a trait. Normally, the `userId` was sent as an `id` inside the traits but Marketo silently ignores that field as they use it for their own purposes. So if you create a custom field inside Marketo for `userId`, your leads will automatically have that field populated.
39+
Note that Segment automatically sends `userId` as a trait. Normally, the `userId` was sent as an `id` inside the traits but Marketo silently ignores that field as they use it for their own purposes. So if you create a custom field inside Marketo for `userId`, your leads automatically have that field populated.
3840

3941
### Server Side
4042

41-
When you can [`identify`](/docs/connections/spec/identify/) with a `traits` object on any of the server-side languages, we make a call to Marketo's `syncLead` SOAP API action. This call either creates or a updates `traits` on a lead based on the email address either in `userId` or `traits.email`.
43+
When you call [Identify](/docs/connections/spec/identify/) with a `traits` object on any of the server-side languages, Segment makes a call to Marketo's `syncLead` SOAP API action. This call either creates or a updates `traits` on a lead based on the email address either in `userId` or `traits.email`.
4244

43-
We will attempt to PascalCase server-side traits. So if you send `secondFavoriteColor` as a trait, we will convert that to `SecondFavoriteColor`, so you should set the trait **API name** in Marketo to `SecondFavoriteColor`. If you send the trait as `second_favorite_color`, we will convert that to `Second_favorite_color`, so you should set the API name to be `Second_favorite_color` (this is less than ideal; however, we plan to update this behavior in v2 of our Marketo destination, so stay tuned!).
45+
Segment attempts to PascalCase server-side traits. So if you send `secondFavoriteColor` as a trait it's converted to `SecondFavoriteColor`, so you should set the trait **API name** in Marketo to `SecondFavoriteColor`. If you send the trait as `second_favorite_color` it's converted to `Second_favorite_color`, so you should set the API name to be `Second_favorite_color`.
4446

45-
Note that leads can only be synced every 30 seconds using the SOAP API. If you exceed the allowed request amount, you will see `Exceeded lock attempts` errors in your debugger.
47+
Note that leads can only be synced every 30 seconds using the SOAP API. If you exceed the allowed request amount, the `Exceeded lock attempts` errors appear in your debugger.
4648

47-
Our server side destination with Marketo **requires your encryption key** along with your email for authentication, make sure you have provided it in your Segment settings.
49+
The server-side destination with Marketo **requires your encryption key** along with your email for authentication, make sure you have provided it in your Segment settings.
4850

49-
Remember to provide an email with every call as either the `userId` or as a trait labeled "email". Here's a java example of that:
51+
Remember to provide an email with every call as either the `userId` or as a trait labeled "email". Here's a Java example of that:
5052

5153
```java
5254
Analytics.identify("hj2kf92ds212",
@@ -57,21 +59,21 @@ Analytics.identify("hj2kf92ds212",
5759

5860
Marketo uses cookies to keep track of visitors and their sessions while visiting your website. The cookie data is stored in the visitor's browser, and is sent along to Marketo every time a new event occurs. This allows them to show a single unique lead between multiple page reloads.
5961

60-
Your servers also have access to this cookie, so they can re-use it when you send server-side events to Segment. If you don't use the existing cookie Segment will use either the userId or sessionId to make the server-side request to Marketo. When we create a new cookie, the client-side and server-side events from the same user will look like two distinct leads when viewed in Marketo. The cookieId takes precedence over all other keys, so if you send both the cookieId and the userId - the cookieId will match first and the userId for that lead will be updated.
62+
Your servers also have access to this cookie, so they can re-use it when you send server-side events to Segment. If you don't use the existing cookie, Segment uses either the `userId` or `sessionId` to make the server-side request to Marketo. When a new cookie is created, the client-side and server-side events from the same user look like two distinct leads when viewed in Marketo. The `cookieId` takes precedence over all other keys, so if you send both the `cookieId` and the `userId` - the `cookieId` matches first and the `userId` for that lead is updated.
6163

6264
To associate leads in server-side Marketo, there are currently three options with Segment:
6365

6466
1. Pass your Marketo cookies to Segment.
65-
2. Use the userId or sessionId when associating leads in Marketo.
66-
3. Ignore the additional visitors generated by passing different types of ids for each call (i.e. cookieId once, then the userId for the same user the second time).
67+
2. Use the `userId` or `sessionId` when associating leads in Marketo.
68+
3. Ignore the additional visitors generated by passing different types of IDs for each call - `cookieId` once, then the `userId` for the same user the second time.
6769

6870
If you choose to pass the cookie with your calls, it will look like this:
6971

7072
```
7173
id:561-HYG-937&token:_mch-marketo.com-1374552656411-90718
7274
```
7375

74-
If you want our server-side destination to use your user's Marketo Cookie, pass it to us in the `context['Marketo'].marketoCookie` object.
76+
If you want our server-side destination to use your user's Marketo Cookie, pass it to Segment in the `context['Marketo'].marketoCookie` object.
7577

7678
Here's a Ruby example:
7779

@@ -91,9 +93,9 @@ Analytics.identify(
9193
)
9294
```
9395

94-
**Note:** If you choose to use the cookie approach, make sure to send the cookie along in your `track` calls as well, as Marketo will need it on subsequent calls to tie activity to that user.
96+
**Note:** If you choose to use the cookie approach, make sure to send the cookie along in your Track calls as well. Marketo needs it on subsequent calls to tie activity to that user.
9597

96-
A `track` call might look like this:
98+
A Track call might look like this:
9799

98100
```ruby
99101
Analytics.track(
@@ -112,10 +114,10 @@ Analytics.track(
112114
)
113115
```
114116

115-
For more information about syncronising your Marketo leads, [visit their documentation](http://developers.marketo.com/documentation/soap/synclead/){:target="_blank"}.
117+
For more information about syncronising your Marketo leads, [visit the Marketo documentation](http://developers.marketo.com/documentation/soap/synclead/){:target="_blank"}.
116118

117-
### Custom Fields
119+
### Custom fields
118120

119-
To create a custom field in Marketo, follow Marketo's [documentation for creating a custom field](http://docs.marketo.com/display/public/DOCS/Create+a+Custom+Field+in+Marketo){:target="_blank"}. Be sure that the **API Name** is `PascalCase`'d, as our destination will account for Marketo's Pascal trait standards.
121+
To create a custom field in Marketo, follow Marketo's [documentation for creating a custom field](http://docs.marketo.com/display/public/DOCS/Create+a+Custom+Field+in+Marketo){:target="_blank"}. Be sure that the **API Name** is `PascalCase`'d, as the destination accounts for Marketo's Pascal trait standards.
120122

121-
For instance, if you configure `SomeTrait` in the **API Name** field (the **Name** value does not matter), you can pass in this field as `someTrait`, and we will convert this to `SomeTrait` when sending into Marketo. Note that if you configured **API Name** to be `someTrait`, and passed it in as `someTrait` in your call, this would fail to send.
123+
For instance, if you configure `SomeTrait` in the **API Name** field (the **Name** value does not matter), you can pass in this field as `someTrait`. Segment converts this to `SomeTrait` when sending into Marketo. Note that if you configured **API Name** to be `someTrait` and passed it in as `someTrait` in your call, this would fail to send.

0 commit comments

Comments
 (0)