summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-08-24 02:15:08 +0100
committerCho <cho@lindenlab.com>2013-08-24 02:15:08 +0100
commit6c45b3677ee06cd58056447a4b7b45fa78df8b74 (patch)
treef42ff209910bf400bd25cc713d86f81aa5da7fb8 /indra
parenta8d5b070b090d7467a1e95134be556951ae6698a (diff)
added Google Analytics query parameters to URLs for FBC photos and checkins for ACME-854
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatersocial.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp
index 4c17d9e40d..2a74c8e3ea 100644
--- a/indra/newview/llfloatersocial.cpp
+++ b/indra/newview/llfloatersocial.cpp
@@ -55,6 +55,8 @@ static LLRegisterPanelClassWrapper<LLSocialAccountPanel> t_panel_account("llsoci
const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte
const std::string DEFAULT_CHECKIN_LOCATION_URL = "http://maps.secondlife.com/";
const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazonaws.com/map_placeholder.png";
+const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare";
+const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=facebook&utm_medium=photo&utm_campaign=slshare";
std::string get_map_url()
{
@@ -345,12 +347,19 @@ void LLSocialPhotoPanel::sendPhoto()
bool add_location = mLocationCheckbox->getValue().asBoolean();
if (add_location)
{
+ // Get the SLURL for the location
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
+ std::string slurl_string = slurl.getSLURLString();
+
+ // Add query parameters so Google Analytics can track incoming clicks!
+ slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS;
+
+ // Add it to the caption (pretty crude, but we don't have a better option with photos)
if (caption.empty())
- caption = slurl.getSLURLString();
+ caption = slurl_string;
else
- caption = caption + " " + slurl.getSLURLString();
+ caption = caption + " " + slurl_string;
}
// Get the image
@@ -592,6 +601,9 @@ void LLSocialCheckinPanel::sendCheckin()
{
slurl_string = DEFAULT_CHECKIN_LOCATION_URL;
}
+
+ // Add query parameters so Google Analytics can track incoming clicks!
+ slurl_string += DEFAULT_CHECKIN_QUERY_PARAMETERS;
// Get the region name
std::string region_name = gAgent.getRegion()->getName();