'Create a tracking code for the button.
Tracking codes are used by LinkedIn to collect
analytics about certifications users are adding
to their profiles.
The tracking code format is:
&trk=[partner name]-[certificate type]-[date]-[target field]
In our case, we\'re sending:
&trk=edx-{COURSE ID}_{COURSE MODE}-{TARGET}
If no partner code is configured, then this will
return None, indicating that tracking codes are disabled.
Arguments:
course_key (CourseKey): The identifier for the course.
cert_mode (str): The enrollment mode for the course.
target (str): Identifier for where the button is located.
Returns:
unicode or None'

def _tracking_code(self, course_key, cert_mode, target):

    return (u'{partner}-{course_key}_{cert_mode}-{target}'.format(partner=self.trk_partner_name, course_key=unicode(course_key), cert_mode=cert_mode, target=target) if self.trk_partner_name else None)
