Created
February 25, 2019 19:26
-
-
Save wakawaka54/23b4d1cb352686cd99c40a8cdf3f6f86 to your computer and use it in GitHub Desktop.
Dynamic AliExpress Affiliate Link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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(); | |
} | |
} |
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
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?