Skip to content

Commit b77b549

Browse files
authored
Update comments in conversion upload examples to clarify source is optional (#491)
1 parent 25dc9ed commit b77b549

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

google-ads-examples/src/main/java/com/google/ads/googleads/examples/remarketing/UploadConversionEnhancement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ private void runExample(
160160
// Creates a user identifier using sample values for the user address.
161161
UserIdentifier addressIdentifier =
162162
UserIdentifier.newBuilder()
163-
// User identifiers for conversion enhancements MUST use first party data.
164-
.setUserIdentifierSource(UserIdentifierSource.FIRST_PARTY)
165163
.setAddressInfo(
166164
OfflineUserAddressInfo.newBuilder()
167165
.setHashedFirstName(normalizeAndHash(sha256Digest, "Joanna"))
@@ -172,6 +170,8 @@ private void runExample(
172170
.setState("CA")
173171
.setPostalCode("94043")
174172
.setCountryCode("US"))
173+
// Optional: Specifies the user identifier source.
174+
.setUserIdentifierSource(UserIdentifierSource.FIRST_PARTY)
175175
.build();
176176

177177
// Creates a user identifier using the hashed email address.

google-ads-examples/src/main/java/com/google/ads/googleads/examples/remarketing/UploadConversionWithIdentifiers.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ private void runExample(
166166
String hashedEmail = normalizeAndHashEmailAddress(sha256Digest, emailAddress);
167167
UserIdentifier userIdentifier =
168168
UserIdentifier.newBuilder()
169-
// User identifiers for conversion enhancements MUST use first party data.
170-
.setUserIdentifierSource(UserIdentifierSource.FIRST_PARTY)
171169
.setHashedEmail(hashedEmail)
170+
// Optional: Specifies the user identifier source.
171+
.setUserIdentifierSource(UserIdentifierSource.FIRST_PARTY)
172172
.build();
173173

174174
// Adds the user identifier to the conversion.

0 commit comments

Comments
 (0)