Click or drag to resize
CampaignAssetUrlInfoHelperNormalizeAssetUrlTarget Method
Creates valid URL target that is AbsolutePath without scheme, port, domain, query strings, fragments and trailing slash at the end. If the url is already normalized, then it is returned. Removes SitePresentationURL from the url.

Namespace: CMS.WebAnalytics
Assembly: CMS.WebAnalytics (in CMS.WebAnalytics.dll) Version: 11.0.0
Syntax
C#
public static string NormalizeAssetUrlTarget(
	string url,
	SiteInfo site
)

Parameters

url
Type: SystemString
URL to be changed to correct format.
site
Type: CMS.SiteProviderSiteInfo
Is value from SitePresentationURL of the content only site.

Return Value

Type: String
Returns valid URL for CampaignAssetUrlTarget property from given URL.
Examples

'http://your-domain.com/landing_page/' is not normalized.

String.Empty is not normalized.

'/' is normalized.

'landing/page' is not normalized.

'/landing/page' is normalized.

'/landing/page/' is not normalized.

See Also