Interfaces
This section includes the available interfaces and examples.
Properties
Name | Description |
---|---|
MappIntelligence.VERSION | Mapp Intelligence version. |
MappIntelligence.V4 | Identifier for pixel v4. |
MappIntelligence.V5 | Identifier for pixel v5. |
MappIntelligence.SMART | Identifier for smart pixel. |
MappIntelligence.CLIENT_SIDE_COOKIE | Identifier for 1st party cookies. |
MappIntelligence.SERVER_SIDE_COOKIE | Identifier for 3rd party cookies. |
Methods
getUserIdCookie
/**
* @param pixelVersion Version ot the current pixel (v4, v5, smart)
* @param context Cookie context (1st, 3rd)
*
* @return MappIntelligenceCookie
*/
MappIntelligenceCookie getUserIdCookie(String pixelVersion, String context);
JAVA
Methods
setDomain
/**
* @param domain Specifies the domain within which this cookie should be presented.
*/
void setDomain(String domain);
JAVA
getDomain
/**
* @return Gets the domain name of this cookie.
*/
String getDomain();
JAVA
setMaxAge
/**
* Sets the maximum age in seconds for this cookie.
*
* @param expiry Sets the maximum age in seconds for this cookie.
*/
void setMaxAge(int expiry);
JAVA
getMaxAge
/**
* Gets the maximum age in seconds of this cookie.
*
* @return Gets the maximum age in seconds of this cookie.
*/
int getMaxAge();
JAVA
setPath
/**
* @param uri Specifies a path for the cookie to which the client should return the cookie.
*/
void setPath(String uri);
JAVA
getPath
/**
* @return Returns the path on the server to which the browser returns this cookie.
*/
String getPath();
JAVA
setSecure
/**
* @param flag Indicates to the browser whether the cookie should only be sent using a secure protocol, such as
* HTTPS or SSL.
*/
void setSecure(boolean flag);
JAVA
isSecure
/**
* @return Returns true if the browser is sending cookies only over a secure protocol, or false if the browser
* can send cookies using any protocol.
*/
boolean isSecure();
JAVA
getName
/**
* @return Returns the name of the cookie.
*/
String getName();
JAVA
getValue
/**
* @return Gets the current value of this cookie.
*/
String getValue();
JAVA
setHttpOnly
/**
* @param isHttpOnly Marks or unmarks this cookie as HttpOnly.
*/
void setHttpOnly(boolean isHttpOnly);
JAVA
isHttpOnly
/**
* @return Checks whether this cookie has been marked as HttpOnly.
*/
boolean isHttpOnly();
JAVA
Create your own LoggerClass to debug our Mapp Intelligence Java library.
Methods
log
/**
* @param msg Debug message
*/
void log(String msg);
JAVA
/**
* @param format String format
* @param args Arguments
*/
void log(String format, Object... args);
JAVA
Example
class CustomLogger implements MappIntelligenceLogger {
/**
* @param msg Debug message
*/
@Override
public void log(String msg) {
System.out.println(msg);
}
/**
* @param format String format
* @param args Arguments
*/
@Override
public void log(String format, Object... args) {
System.out.println(String.format(format, args));
}
}
JAVA
Create your own ConsumerClass to use for data transfer to Intelligence.
Methods
sendBatch
/**
* @param batchContent List of tracking requests
*
* @return boolean
*/
boolean sendBatch(List<String> batchContent);
JAVA
Example
class TestCustomPrintConsumer implements MappIntelligenceConsumer {
/**
* @param batchContent List of tracking requests
*
* @return boolean
*/
public boolean sendBatch(List<String> batchContent) {
for (String request : batchContent) {
System.out.println(request);
}
return true;
}
}
JAVA