Class ParamBuilder

java.lang.Object
com.facebook.capi.sdk.ParamBuilder

public class ParamBuilder extends Object
Core function to help process Conversions API params
  • Constructor Details

    • ParamBuilder

      public ParamBuilder(List<String> domainList)
      Constructor for ParamBuilder. The domainlist helps provide more accurate results for CookieSetting's domain value
      Parameters:
      domainList - list of ETLD+1 associated with website URLs
    • ParamBuilder

      public ParamBuilder(ETLDPlusOneResolver etldPlus1Resolver)
      Constructor for ParamBuilder. The customized ETLD+1 resolver helps provide more accurate results for CookieSetting's domain value
      Parameters:
      etldPlus1Resolver - customized etldPlus1Resolver which implement the interface of ETLDPlusOneResolver
    • ParamBuilder

      public ParamBuilder()
      Constructor for ParamBuilder. Prefered domainList or ETLD+1 option for more accurate result
  • Method Details

    • setCookieUtils

      protected void setCookieUtils(List<FbcParamConfig> fbcParamConfigs)
      For unit test only
      Parameters:
      fbcParamConfigs - configs
    • processRequest

      public List<CookieSetting> processRequest(String host, Map<String,String[]> queries, Map<String,String> cookies)
      Process and provide recommended cookies to save.
      Parameters:
      host - Current full url. eg. test.example.com
      queries - Current query params in map format
      cookies - Current cookies in map format
      Returns:
      A list of CookieSettings recommended to save
    • processRequest

      public List<CookieSetting> processRequest(String host, Map<String,String[]> queries, Map<String,String> cookies, String referrer)
      Process and provide recommended cookies to save.
      Parameters:
      host - Current full url. eg. test.example.com
      queries - Current query params in map format
      cookies - Current cookies in map format
      referrer - Full url with query params from referrer.
      Returns:
      A list of CookieSettings recommended to save
    • getCookiesToSet

      public List<CookieSetting> getCookiesToSet()
      Return a list of CookieSttings Only return the cookies we recommended to update. If you already have the cookie properly set, no need to update. It won't get returned here.
      Returns:
      list of CookieSetting
    • getFbc

      public String getFbc()
      Return fbc value
      Returns:
      fbc
    • getFbp

      public String getFbp()
      Return fbp value
      Returns:
      fbp