IDEA-254393 provide stats tracking parameters for embedded what's new page

GitOrigin-RevId: a045b034f461476850b89ca35c768904150e96b4
This commit is contained in:
Dmitry.Krasilschikov
2020-11-02 18:26:05 +00:00
committed by intellij-monorepo-bot
parent 1789348082
commit 9e763400ad
@@ -18,6 +18,7 @@ import com.intellij.openapi.updateSettings.impl.UpdateChecker;
import com.intellij.openapi.util.NlsContexts.DetailedDescription;
import com.intellij.openapi.util.io.StreamUtil;
import com.intellij.ui.jcef.JBCefApp;
import com.intellij.util.PlatformUtils;
import com.intellij.util.Url;
import com.intellij.util.Urls;
import com.intellij.util.ui.UIUtil;
@@ -76,7 +77,10 @@ public class WhatsNewAction extends AnAction implements DumbAware {
else if (url != null) {
boolean darkTheme = UIUtil.isUnderDarcula();
Url embeddedUrl = Urls.newFromEncoded(url).addParameters(Map.of("var", "embed"));
Url embeddedUrl = Urls.newFromEncoded(url)
.addParameters(Map.of("var", "embed"))
.addParameters(Map.of("utm_content", ApplicationInfo.getInstance().getMajorVersion()))
.addParameters(Map.of("utm_campaign", PlatformUtils.getPlatformPrefix()));
if (darkTheme) {
embeddedUrl = embeddedUrl.addParameters(Map.of("theme", "dark"));
}