Drupal 6 Views: selection rules and affiliate domains - drupal

I'm having a problem with a View not showing up on an affiliate domain.
There are two new domains which are both to serve up the same content as another existing domain. All content to be served resides in the Drupal database.
We have two main sites w/content, a US version and a European version. The new domains are to serve up the European site.
I added the two new domain records via the domain access module and then went through and added those two new domains to the "Publish to" for all affiliate content that was currently on the European site.
I went through Pages and modified the selection rules to include the new domains.
The particular page has a pane containing a view. That page is at the url 'xxx/press'.
On the Euro site, everything works fine. On the new domains, all content shows and menus work except on the xx/press page, the view doesn't show. The page is coming up and the header node shows so it's just the specific view.
Since that view is on a Page content-type and that Page has selection rules which specify the new domains as a means to show, I'm not sure why it's not showing up.
Is there anywhere else besides the selection-rules of the actual Page that the view is being called on that could limit when/where that View shows?

I found the answer. Too much control!! For the record, in the Views there was one language setting under Filters and the language setting of the new domains didn't match that one.
Amazing that exclusion of content occurs in so many areas and ways! It's like visiting Photoshop all over again and looking at ways to make drop shadows.

Related

How to make the country name to be a part of the URL in Asp.net core Razor pages

We developed a website using ASP.net core Razor Pages so we have some pages in the website served through URLs like
Domain/Solutions
Domain/solutions/details/1
Domain/aboutus
and other many links of course
After completing the development the customer requested to allow the user to select the company branch before browsing the website so the home page of the site will contain multiple cards one for each branch, for Example, "Dubai Branch, USA Branch, ...."
If the user clicked Dubai Branch for example we need all the URLs to contain that branch as a parameter like following
Domain/dubai/solutions
Domain/dubai/solutions/details/1
Domain/dubai/aboutus
We need to catch "dubai" as a parameter with all the subsequent requests to filter the content of the pages accordingly and to do this change at a minimal cost, first is that applicable? how to achieve that without many changes
You can mark part of a URL as a param like that
Domain/{branch}/solutions
Domain/{branch}/solutions/details/1
Domain/{branch}/aboutus
so you will be able to read it in your razor page behind code and customer will be able to sent there anything.
you can do this using Area like dubai,usa etc but you need to create separate code for each area.
another option is dynamic routing .

Find how many users viewed any page within a section of pages

Site structure is simple:
/menu
/blog
/photos
Each of these "sections" have many pages below them. All of these pages follow the url structure: pages under /menu have the url /menu/nameofthething, etc.
How do I answer the question: "of all of the users to our website, how many users ever view any page under /blog?"
"Content Drilldown" allows you to see page views for a section like /menu or /blog but it doesn't appear to give me any data that would allow me to calculate that from page views into users.
Any help would be much appreciated.
You can create a custom segment of your users, who have visited a given page or set of pages, or a segment of sessions, that contain a visit of selected page(s). (Look for Conditions tab under Advanced group of New segment dialog.) You can apply this segment to your reports, e.g. Audience reports in your case, which will give you number of users for this particular segment and selected time period.

Create a list in Views of non-node pages created in Views and Custom Pages

I have a fairly large enterprise site and I am needing to create a dynamic HTML site map. Similar to the site map at Apple.
With that in mind, I have created a view that lists all node-based pages (i.e.) those pages created and associated with a content type. The problem is that many of the pages on the site are pages created in Views or in Custom Pages and the url is defined there. These aren't dynamic pages, rather they are pages built to be main pages for different sections.
Example: the site has a team content type. This content holds information about an employe. The page at the node level is site.com/team/john-doe. I've set up a view page with the url site.com/team - This lists the name and a photo of the team member.
This is the case for many sections on the site, since these are important pages I need to somehow create a view that lists these pages so I can then take that view content pane and the node-based content pages and drop that into a custom page to build the HTML site map.
Since these custom pages aren't stored in the db I am not sure how I can get views to extract that data and render it as a list.
Any suggestions?
I think what you are looking to achieve is going to be driven more by menus than by views or nodes, custom or otherwise. The menu system contains references to all paths on the site, whether they were created by nodes, views, taxonomies, custom code, etc.
You might find the Menu Views module useful for this:
http://drupal.org/project/menu_views
For a slightly different approach, I would also suggest looking at the Site Map module:
http://drupal.org/project/site_map

Google Analytics referral triggered by a bookmarklet

I have a question regarding Google Analytics and unwanted referral stats generated by a bookmarklet.
I have a web service with GA installed. My users are using a bookmarklet to accomplish a certain task while visiting some other web page. Bookmarklet creates an iframe and opens up a page which is also on my domain and that page contains the same GA code.
For some reason GA sees those web sites (pages that bookmarklet was used on) as referral pages. That creates a problem for me since those pages are not real referrals (no actual links to my site). I have no desire to track pages my users marked with the bookmarklet.
It’s important to mention that bookmarklet page must be a part of the same domain as my main page. I can not move it on other domain or subdomain.
This is what I tried so far:
I’ve created a new GA account (subdomain.mydomain.com) and used it only on my bookmarklet page hoping that all stats related with the bookmarklet will appear on that account. This worked only partially. Stats for the bookmarklet started to appear on the new account but my original GA account continued to track referral pages.
We tried to use a pop up window to load a web page instead of the iframe. No difference.
Any help on how to get rid of unwanted referral sites would be appreciated.
See _setReferrerOveride:
_setReferrerOverride()
_setReferrerOverride(newReferrerUrl)
Sets the referrer URL used to determine campaign tracking values. Use this method to allow gadgets within an iFrame to track referrals correctly. By default, campaign tracking uses the document.referrer property to determine the referrer URL, which is passed in the utmr parameter of the GIF request. However, you can over-ride this parameter with your own value. For example, if you set the new referrer to http://www.google.com/search?hl=en&q=hats, the campaign cookie stores a new campaign with source=google, medium=organic, and keyword=hats.
_gaq.push(['_setReferrerOverride', 'URL-YOU-WANT-AS-REFERRER']);
Or, you could try
_addIgnoredRef():
_addIgnoredRef()
_addIgnoredRef(newIgnoredReferrer)
Excludes a source as a referring site. Use this option when you want to set certain referring links as direct traffic, rather than as referring sites. For example, your company might own another domain that you want to track as direct traffic so that it does not show up on the "Referring Sites" reports. Requests from excluded referrals are still counted in your overall page view count.
Async Snippet (recommended)
_gaq.push(['_addIgnoredRef', 'www.sister-site.com']);
You would have to grab the referrer and populate it dynamically. Probably with parent.document.referrer Of course this might make any referrals (non-bookmarklet) from these sites not record in the future. And, at some point you would need to clear them.
The most simple solution, if you don't need to track the hits from the bookmarklet at all, is to simply not include the GA code in the web page when it is opened by the bookmarklet.
Your bookmarklet can open the page like http://yoursite.com/?mode=bookmarklet
And in your server side code you can use something like
if ( mode != "bookmarklet" ) {
outputGaCode()
}

Localization For Two Different Regions/Domains with the Same Language

I have a Wordpress site which is based in US (ex. www.example.com). We've been tasked to create a UK/GB version of the site which has it's own domain (ex. www.example.co.uk), but shares the same common pages/posts/backend. About 75% of the pages are the same on both versions but there will be a few sections (like About and Contact) where they are different to account for regional differences.
Example
US site (www.example.com) has 4 Pages:
Home
About
Services
Contact
UK Site (www.example.co.uk) also has 3 pages (2 different, 1 the same)
Home (The same as US, but the URL should be www.example.co.uk)
About (Different content, the URL should be www.example.co.uk/about)
Services (The same as US, but URL should be www.example.co.uk/services)
Contact (Different content, the URL should be www.example.co.uk/contact)
How do I go about setting up the UK/GB version of the site which use the same backend and most of the same content from the base site, but has a few page differences and different domain?
I'd use WPML plugin, it allows tranlations of posts, pages, categories, menus, and plugins that have language files. It will let your end use login from the same admin area, and then add translations to the existing content.
The tricky bit will be setting it up to work on domain detection, normally it works on a subdomain, or add's a variable to the end of the URL, like ?lang=uk
But that said it should be possible though with a bit of tinkering to setup something based on the URL. And the documentation is pretty comprehensive. Good luck!
It's also possible to make it differently. For our shops we pretend there's a new domain, but in fact there isn't. This also works for SEO because we do make sure the language tags and such are correct. We replace only a few parts such as a few javascripts and conversion pixels and then we are done. See for example on Keepershandschoenen-shop.be. This site is in fact a clone so we don't need wpml. We don't even need a wordpress, magento or whatever CMS installation...
So then you have the same backend, with .com acting as .co.uk also.

Resources