Skip to content

Instantly share code, notes, and snippets.

@wakawaka54
Created February 25, 2019 19:26
Show Gist options
  • Save wakawaka54/23b4d1cb352686cd99c40a8cdf3f6f86 to your computer and use it in GitHub Desktop.
Save wakawaka54/23b4d1cb352686cd99c40a8cdf3f6f86 to your computer and use it in GitHub Desktop.
Dynamic AliExpress Affiliate Link
@Slf4j
public class AffiliateInformationProvider {
private final static String AFFILIATE_BASE_URL = "http://s.click.aliexpress.com/deep_link.htm";
private final static String AFFILIATE_SHORT_KEY = "YOUR_SHORT_KEY";
public String getAffiliateUrl(String detailUrl) {
URL url = UrlBuilder.fromString(AFFILIATE_BASE_URL)
.addParameter("dl_target_url", detailUrl)
.addParameter("aff_short_key", AFFILIATE_SHORT_KEY)
.toUrl();
return url.toExternalForm();
}
}
@asquare22
Copy link

Hello,
Can you please guide me on how we can use the above code? My issue is not able to use the google ads tracking link, as if I m using any third-party tracker link like bemob or another, google disapproved the campaign saying not eligible (Malicious software). Can you please help me to provide the solution for the same?

@Poissac9
Copy link

Hey, can you tell me how where i can find short key ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment